Skip to content

Commit

Permalink
Merge pull request #44 from Azure/e-43
Browse files Browse the repository at this point in the history
Change `output identity_ids` to new `container_app_identities`
  • Loading branch information
jiaweitao001 authored Dec 20, 2023
2 parents 4aea767 + 82b6bf6 commit ae236d2
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@ output "container_app_fqdn" {
value = { for name, container in azurerm_container_app.container_app : name => "https://${try(container.ingress[0].fqdn, "")}" if can(container.ingress[0].fqdn) }
}

output "container_app_identities" {
description = "The identities of the Container App, key is Container App's name."
value = { for name, container in azurerm_container_app.container_app : name => length(container.identity) > 0 ? {
type = try(container.identity[0].type, "")
identity_ids = try(container.identity[0].identity_ids, [])
principal_id = try(container.identity[0].principal_id, "")
tenant_id = try(container.identity[0].tenant_id, "")
} : null }
}

output "container_app_ips" {
description = "The IPs of the Latest Revision of the Container App."
value = try(azurerm_container_app_environment.container_env[0].static_ip_address, data.azurerm_container_app_environment.container_env[0].static_ip_address)
}

output "identity_ids" {
description = "The identities of the Container App."
value = { for name, container in azurerm_container_app.container_app : name => container.identity }
}

0 comments on commit ae236d2

Please sign in to comment.