Skip to content

Commit

Permalink
change container app secret to a map
Browse files Browse the repository at this point in the history
  • Loading branch information
Darren Hull committed Jul 4, 2024
1 parent f634cef commit 8533327
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions modules/compute/container_app/container_app.tf
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,13 @@ resource "azurerm_container_app" "ca" {
}

dynamic "secret" {
for_each = try(var.settings.secret, {})

for_each = {
for key, value in try(var.settings.secret, {}) : key => value
}
content {
name = secret.value.name
value = secret.value.value
key_vault_secret_id = try(data.azurerm_key_vault_secret.secret[secret.key].id, null)
name = each.value.name
value = try(each.value.value, null)
key_vault_secret_id = try(data.azurerm_key_vault_secret.secret[each.key].id, null)
}
}

Expand Down

0 comments on commit 8533327

Please sign in to comment.