Skip to content

Commit

Permalink
fix(codebuild): guard TF_WORKSPACE empty + debug echo in pre_build
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Mar 17, 2026
1 parent 1c8f2a2 commit d94daef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions codebuild/buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ phases:
pre_build:
on-failure: ABORT
commands:
- TF_WORKSPACE="${TF_WORKSPACE:-default}"
- echo "TF_WORKSPACE=${TF_WORKSPACE}"
- test -n "$TF_WORKSPACE" || { echo "ERROR: TF_WORKSPACE is empty"; exit 1; }
- export TF_VAR_github_token="$GITHUB_TOKEN"
- |
BACKEND_CONFIG="backend-configs/${TF_WORKSPACE}.tf"
Expand Down

0 comments on commit d94daef

Please sign in to comment.