Skip to content

Commit

Permalink
test.yml: export to tfvars
Browse files Browse the repository at this point in the history
  • Loading branch information
digorgonzola committed Dec 8, 2023
1 parent f7da82d commit c9d297d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ jobs:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}

- name: Export shared infrastructure SSM parameter values to tfvars
env:
ENVIRONMENT: ${{ vars.ENVIRONMENT }}
run: |
params=( apps core rds/${{ vars.RDS_PARAMETER_NAME }} )
for param in ${params[@]}; do
Expand All @@ -104,7 +106,7 @@ jobs:
--output json \
--query 'Parameters[*]' \
| jq '. |= map({ (.Name | split("/")[-1]): .Value }) | add' \
>> ${{ vars.ENVIRONMENT }}.${param/\//-}.auto.tfvars.json
>> ${ENVIRONMENT}.${param/\//-}.auto.tfvars.json
done
- name: Expose github environment as shell variables
Expand Down

0 comments on commit c9d297d

Please sign in to comment.