From 330562cb5f1a1e4e3cba31b505b84b50179a888d Mon Sep 17 00:00:00 2001 From: BryanFauble <17128019+BryanFauble@users.noreply.github.com> Date: Wed, 6 Nov 2024 15:57:04 -0700 Subject: [PATCH] Add if check within for_each loop --- deployments/spacelift/dpe-k8s/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployments/spacelift/dpe-k8s/main.tf b/deployments/spacelift/dpe-k8s/main.tf index cdd6ba50..73146ec8 100644 --- a/deployments/spacelift/dpe-k8s/main.tf +++ b/deployments/spacelift/dpe-k8s/main.tf @@ -263,7 +263,7 @@ resource "spacelift_environment_variable" "auth0-stack-environment-variables" { spacelift_stack.auth0 ] - for_each = local.auth0_stack_variables + for_each = { for k, v in local.auth0_stack_variables : k => v if var.deploy_auth0 } stack_id = spacelift_stack.auth0[0].id name = "TF_VAR_${each.key}"