Skip to content

Commit

Permalink
Add nonsensitive around for_each argument
Browse files Browse the repository at this point in the history
  • Loading branch information
paulblum00 authored Jan 14, 2025
1 parent edb3f20 commit 6391c44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion role_assignments.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ data "azurerm_user_assigned_identity" "cluster_identity" {
# https://learn.microsoft.com/en-us/azure/aks/configure-azure-cni#prerequisites
# https://github.com/Azure/terraform-azurerm-aks/issues/178
resource "azurerm_role_assignment" "network_contributor" {
for_each = var.create_role_assignment_network_contributor && (var.client_id == "" || var.client_secret == "") ? local.subnet_ids : []
for_each = nonsensitive(var.create_role_assignment_network_contributor && (var.client_id == "" || var.client_secret == "") ? local.subnet_ids : [])

principal_id = coalesce(try(data.azurerm_user_assigned_identity.cluster_identity[0].principal_id, azurerm_kubernetes_cluster.main.identity[0].principal_id), var.client_id)
scope = each.value
Expand Down

0 comments on commit 6391c44

Please sign in to comment.