Skip to content

Commit

Permalink
deploy-development.yml: export TF_VAR variables with correct case
Browse files Browse the repository at this point in the history
  • Loading branch information
digorgonzola committed Dec 19, 2023
1 parent 42b2d08 commit b03d467
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/deploy-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,20 @@ jobs:
echo "$VARS_CONTEXT" | to_envs >> $GITHUB_ENV
echo "$SECRETS_CONTEXT" | to_envs >> $GITHUB_ENV
- name: Export TF_VAR variables to environment with correct case
env:
vars_json: ${{ toJSON(vars) }}
run: |
tf_vars=$(echo $vars_json | jq -r '
. | with_entries( .key |= ascii_downcase | select(.key | startswith("tf_var")))
| to_entries
| map("TF_VAR_\(.key| split("tf_var_")[-1])=\(.value)") |.[]')
for var in "${tf_vars[@]}"; do
echo "$var"
echo "$var" >> $GITHUB_ENV
done
- name: Terragrunt Plan
uses: gruntwork-io/terragrunt-action@v2
with:
Expand Down

0 comments on commit b03d467

Please sign in to comment.