Skip to content

Commit

Permalink
feat: cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
dkool authored and dkool committed Mar 7, 2024
1 parent 32bf102 commit c7bb580
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -387,20 +387,18 @@ resource "azurerm_kubernetes_cluster" "aks" {
}

dynamic "identity" {
for_each = contains(keys(var.cluster), "identity") ? [var.cluster.identity] : []
for_each = contains(keys(var.cluster), "identity") ? [var.cluster.identity] : [{
type = "SystemAssigned"
}]

content {
type = identity.value.type
identity_ids = contains(["UserAssigned"], identity.value.type) ? concat(
identity_ids = identity.value.type == "UserAssigned" ? concat(
try([azurerm_user_assigned_identity.identity["identity"].id], []),
try(lookup(identity.value, "identity_ids", []), [])
) : []
}
}

#identity {
#type = "SystemAssigned"
#}
}

# secrets
Expand Down

0 comments on commit c7bb580

Please sign in to comment.