Skip to content

Commit

Permalink
fix: do not set DEFAULT_REGION env var if var.region is empty (#69)
Browse files Browse the repository at this point in the history
fix: do not set `DEFAULT_REGION` env var if `var.region` is empty
  • Loading branch information
marwinbaumannsbp authored Oct 29, 2024
1 parent 25f0dc4 commit bdf8280
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bdf8280

Please sign in to comment.