From f2bb19e20bedd7baed7aac8031cc169a4c46571a Mon Sep 17 00:00:00 2001 From: Henrik Knutsen <46495473+hknutsen@users.noreply.github.com> Date: Fri, 13 Jan 2023 08:32:39 +0100 Subject: [PATCH] fix: output null if identity not configured --- modules/app/outputs.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/app/outputs.tf b/modules/app/outputs.tf index be1ec17..b1770c1 100644 --- a/modules/app/outputs.tf +++ b/modules/app/outputs.tf @@ -10,10 +10,10 @@ output "name" { output "identity_principal_id" { description = "The principal ID of the system-assigned identity of this Web App." - value = var.identity != null ? local.web_app.identity[0].principal_id : null + value = try(local.web_app.identity[0].principal_id, null) } output "identity_tenant_id" { description = "The tenant ID of the system-assigned identity of this Web App." - value = var.identity != null ? local.web_app.identity[0].tenant_id : null + value = try(local.web_app.identity[0].tenant_id, null) }