Skip to content

Commit

Permalink
fixed msi
Browse files Browse the repository at this point in the history
  • Loading branch information
TomArcherMsft committed Nov 21, 2024
1 parent bf53cf1 commit 3b45239
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions quickstart/101-azure-automation/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,20 @@ resource "azurerm_automation_account" "example" {
location = azurerm_resource_group.rg.location
sku_name = "Basic"
identity {
type = "UserAssigned"
identity_ids = [azurerm_user_assigned_identity.example.id]
type = "SystemAssigned"
}

public_network_access_enabled = true
}

data "azurerm_subscription" "current" {}

data "azurerm_role_definition" "contributor" {
name = "Contributor"
}

resource "azurerm_role_assignment" "example" {
scope = data.azurerm_subscription.current.id
role_definition_name = "Contributor"
principal_id = azurerm_automation_account.example.identity[0].principal_id
}

0 comments on commit 3b45239

Please sign in to comment.