From bdf828003455dcfa79cc02b186e9ab123e141354 Mon Sep 17 00:00:00 2001 From: Marwin Baumann <56264798+marwinbaumannsbp@users.noreply.github.com> Date: Tue, 29 Oct 2024 08:29:23 +0100 Subject: [PATCH] fix: do not set `DEFAULT_REGION` env var if `var.region` is empty (#69) fix: do not set `DEFAULT_REGION` env var if `var.region` is empty --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index b415c00..7cd64ea 100644 --- a/main.tf +++ b/main.tf @@ -17,7 +17,7 @@ module "tfe-workspace" { auto_apply = var.auto_apply auto_apply_run_trigger = var.auto_apply_run_trigger branch = var.branch - clear_text_env_variables = merge({ AWS_DEFAULT_REGION = var.region }, var.clear_text_env_variables) + clear_text_env_variables = var.region != null ? merge(var.clear_text_env_variables, { AWS_DEFAULT_REGION = var.region }) : var.clear_text_env_variables clear_text_hcl_variables = var.clear_text_hcl_variables clear_text_terraform_variables = var.clear_text_terraform_variables description = var.description