Skip to content

Commit a047f32

Browse files
authored
assign network contributor role to control plane identity (#369)
not to the kubelet identity. Relevant docs: https://learn.microsoft.com/en-us/azure/aks/use-managed-identity#summary-of-managed-identities
1 parent 5c56a7d commit a047f32

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ resource "azurerm_role_assignment" "acr" {
702702
resource "azurerm_role_assignment" "network_contributor" {
703703
for_each = var.create_role_assignment_network_contributor ? local.subnet_ids : []
704704

705-
principal_id = azurerm_kubernetes_cluster.main.kubelet_identity[0].object_id
705+
principal_id = azurerm_kubernetes_cluster.main.identity[0].principal_id
706706
scope = each.value
707707
role_definition_name = "Network Contributor"
708708
}

0 commit comments

Comments
 (0)