Skip to content

Commit

Permalink
update aso roles
Browse files Browse the repository at this point in the history
  • Loading branch information
maciaszczykm committed Oct 4, 2023
1 parent 146b9f7 commit 888037b
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions bootstrap/terraform/azure-bootstrap/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
data "azurerm_subscription" "sub" {
}

data "azurerm_resource_group" "group" {
name = var.resource_group
}
Expand Down Expand Up @@ -204,14 +207,8 @@ resource "azurerm_user_assigned_identity" "aso" {
resource_group_name = data.azurerm_resource_group.group.name
}

resource "azurerm_role_assignment" "aso-rg-contributor" {
scope = data.azurerm_resource_group.group.id
role_definition_name = "Contributor"
principal_id = azurerm_user_assigned_identity.aso.principal_id
}

resource "azurerm_role_assignment" "aso-node-rg-contributor" {
scope = data.azurerm_resource_group.node_group.id
resource "azurerm_role_assignment" "aso-sub-contributor" {
scope = data.azurerm_subscription.sub.id
role_definition_name = "Contributor"
principal_id = azurerm_user_assigned_identity.aso.principal_id
}
Expand Down

0 comments on commit 888037b

Please sign in to comment.