Skip to content

Commit

Permalink
chore(AZ-1453): handle all combinaison for identity type
Browse files Browse the repository at this point in the history
  • Loading branch information
jmapro committed Sep 9, 2024
1 parent 1006f6a commit 52b1896
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ locals {
}


identity = var.azure_monitor_agent_user_assigned_identity != null || var.identity.type == "UserAssigned" ? {
type = "SystemAssigned, UserAssigned"
identity_ids = compact(concat(var.identity.identity_ids, [var.azure_monitor_agent_user_assigned_identity]))
identity = var.azure_monitor_agent_user_assigned_identity != null || try(var.identity.type == "UserAssigned", false) ? {
type = join(", ", toset(compact(["UserAssigned", try(var.identity.type, "")])))
identity_ids = compact(concat(try(var.identity.identity_ids, []), [var.azure_monitor_agent_user_assigned_identity]))
} : var.identity

ama_settings = var.azure_monitor_agent_user_assigned_identity != null ? jsonencode({
Expand Down

0 comments on commit 52b1896

Please sign in to comment.