From bf265a49c1d73dc31ba2ac6bff3c7cdda7d644a6 Mon Sep 17 00:00:00 2001 From: cloudneutral Date: Wed, 24 Dec 2025 15:32:04 +0800 Subject: [PATCH] Use BOOTSTRAP_CONFIG_PATH only for bootstrap config --- .github/workflows/iac-pipeline-aws-global-bootstrap.yaml | 1 + .../aws-cloud/bootstrap/identity/terragrunt.hcl | 4 ++-- .../aws-cloud/bootstrap/lock/terragrunt.hcl | 4 ++-- .../aws-cloud/bootstrap/state/terragrunt.hcl | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/iac-pipeline-aws-global-bootstrap.yaml b/.github/workflows/iac-pipeline-aws-global-bootstrap.yaml index b530c5bc..38e5f6f1 100644 --- a/.github/workflows/iac-pipeline-aws-global-bootstrap.yaml +++ b/.github/workflows/iac-pipeline-aws-global-bootstrap.yaml @@ -35,6 +35,7 @@ env: TG_VERSION: 0.67.14 GITOPS_REPO_ROOT: gitops GITOPS_BOOTSTRAP_CONFIG: ${{ github.event.inputs.gitops_bootstrap_config || 'config/xzerolab/sit/aws-cloud/account/bootstrap.yaml' }} + BOOTSTRAP_CONFIG_PATH: ${{ format('{0}/{1}/{2}', github.workspace, env.GITOPS_REPO_ROOT, env.GITOPS_BOOTSTRAP_CONFIG) }} jobs: bootstrap: diff --git a/terraform-hcl-standard/aws-cloud/bootstrap/identity/terragrunt.hcl b/terraform-hcl-standard/aws-cloud/bootstrap/identity/terragrunt.hcl index 71a476df..4af91339 100644 --- a/terraform-hcl-standard/aws-cloud/bootstrap/identity/terragrunt.hcl +++ b/terraform-hcl-standard/aws-cloud/bootstrap/identity/terragrunt.hcl @@ -12,7 +12,7 @@ terraform { inputs = { bootstrap_config_path = coalesce( - get_env("TF_CONFIG", null), - get_env("BOOTSTRAP_CONFIG_PATH", "") + trimspace(get_env("BOOTSTRAP_CONFIG_PATH", "")), + null ) } diff --git a/terraform-hcl-standard/aws-cloud/bootstrap/lock/terragrunt.hcl b/terraform-hcl-standard/aws-cloud/bootstrap/lock/terragrunt.hcl index 007495c5..7e4f1097 100644 --- a/terraform-hcl-standard/aws-cloud/bootstrap/lock/terragrunt.hcl +++ b/terraform-hcl-standard/aws-cloud/bootstrap/lock/terragrunt.hcl @@ -12,7 +12,7 @@ terraform { inputs = { bootstrap_config_path = coalesce( - get_env("TF_CONFIG", null), - get_env("BOOTSTRAP_CONFIG_PATH", "") + trimspace(get_env("BOOTSTRAP_CONFIG_PATH", "")), + null ) } diff --git a/terraform-hcl-standard/aws-cloud/bootstrap/state/terragrunt.hcl b/terraform-hcl-standard/aws-cloud/bootstrap/state/terragrunt.hcl index 633bb094..c30f9460 100644 --- a/terraform-hcl-standard/aws-cloud/bootstrap/state/terragrunt.hcl +++ b/terraform-hcl-standard/aws-cloud/bootstrap/state/terragrunt.hcl @@ -8,7 +8,7 @@ terraform { inputs = { bootstrap_config_path = coalesce( - get_env("TF_CONFIG", null), - get_env("BOOTSTRAP_CONFIG_PATH", "") + trimspace(get_env("BOOTSTRAP_CONFIG_PATH", "")), + null ) }