use format to not need concatenation in dynamic secret name

This commit is contained in:
41666 2020-12-06 19:49:48 -05:00
parent bbdea9c074
commit a3778c7a1e

View file

@ -124,7 +124,7 @@ jobs:
run: | run: |
sh -c 'echo '$TF_DATA' | jq > actions.tfvars.auto.json' >/dev/null 2>&1 sh -c 'echo '$TF_DATA' | jq > actions.tfvars.auto.json' >/dev/null 2>&1
env: env:
TF_DATA: ${{ secrets['TF_DATA_'+github.event.inputs.environment] }} TF_DATA: ${{ secrets[format('TF_DATA_{0}', github.event.inputs.environment)] }}
- run: | - run: |
terraform plan \ terraform plan \
@ -136,4 +136,5 @@ jobs:
terraform apply \ terraform apply \
--var-file variables/global.tfvars \ --var-file variables/global.tfvars \
--var-file variables/${{github.event.inputs.environment}}.tfvars \ --var-file variables/${{github.event.inputs.environment}}.tfvars \
-auto-approve \
deployment.tfplan deployment.tfplan