From 132e0e842ca2b1601e204073ddafbc1fc5460d58 Mon Sep 17 00:00:00 2001 From: Chris Taylor Date: Fri, 27 Jun 2025 18:08:48 -0500 Subject: [PATCH 1/2] Work around coalesce needing a value even when we are deploying persistent resources --- terragrunt.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terragrunt.hcl b/terragrunt.hcl index 08169c2..2a61465 100644 --- a/terragrunt.hcl +++ b/terragrunt.hcl @@ -18,7 +18,7 @@ locals { bucket = "${local.name_dash}-${local.region}-${local.name_hash}-tfstate" dynamodb_table = "${local.name_dash}-${local.region}-${local.name_hash}-tflocks" repo_name = basename(abspath("${get_path_to_repo_root()}")) - state_filename_ephemeral = "${local.account_name}/${coalesce(local.git_branch, local.current_user)}/${local.environment_instance}/terraform.tfstate" + state_filename_ephemeral = "${local.account_name}/${coalesce(local.git_branch, local.current_use, "/")}/${local.environment_instance}/terraform.tfstate" state_filename_persist = "${local.account_name}/${local.environment_instance}/terraform.tfstate" } From c4f19d9a2d4a2566b94feef10dcaa7c24039f412 Mon Sep 17 00:00:00 2001 From: Chris Taylor Date: Fri, 27 Jun 2025 18:10:25 -0500 Subject: [PATCH 2/2] Typo --- terragrunt.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terragrunt.hcl b/terragrunt.hcl index 2a61465..b1976ed 100644 --- a/terragrunt.hcl +++ b/terragrunt.hcl @@ -18,7 +18,7 @@ locals { bucket = "${local.name_dash}-${local.region}-${local.name_hash}-tfstate" dynamodb_table = "${local.name_dash}-${local.region}-${local.name_hash}-tflocks" repo_name = basename(abspath("${get_path_to_repo_root()}")) - state_filename_ephemeral = "${local.account_name}/${coalesce(local.git_branch, local.current_use, "/")}/${local.environment_instance}/terraform.tfstate" + state_filename_ephemeral = "${local.account_name}/${coalesce(local.git_branch, local.current_user, "/")}/${local.environment_instance}/terraform.tfstate" state_filename_persist = "${local.account_name}/${local.environment_instance}/terraform.tfstate" }