Skip to content

Commit

Permalink
Merge pull request #71 from XenitAB/fix/ghrunner-identity
Browse files Browse the repository at this point in the history
Fix/ghrunner identity
  • Loading branch information
simongottschlag authored Dec 7, 2020
2 parents 7606a87 + 993a242 commit e0b4d6c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions modules/azure/github-runner/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ terraform {
}
}

data "azurerm_subscription" "this" {}

data "azurerm_resource_group" "this" {
name = local.resource_group_name
}
Expand Down Expand Up @@ -106,10 +108,25 @@ resource "azurerm_linux_virtual_machine_scale_set" "this" {
}
}

identity {
type = "SystemAssigned"
}

lifecycle {
ignore_changes = [
tags,
instances
]
}
}

resource "azurerm_key_vault_access_policy" "this" {
key_vault_id = data.azurerm_key_vault.this.id

tenant_id = data.azurerm_subscription.this.tenant_id
object_id = azurerm_linux_virtual_machine_scale_set.this.identity[0].principal_id

secret_permissions = [
"get",
]
}

0 comments on commit e0b4d6c

Please sign in to comment.