File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 1212 description : Whether to acquire terraform state lock during sync
1313 required : false
1414 default : " true"
15+ refresh :
16+ description : Refresh terraform state before sync
17+ required : false
18+ default : " false"
1519
1620jobs :
1721 prepare :
7781 terraform workspace select "${TF_WORKSPACE_OPT}" || terraform workspace new "${TF_WORKSPACE_OPT}"
7882 echo "TF_WORKSPACE=${TF_WORKSPACE_OPT}" >> $GITHUB_ENV
7983 working-directory : terraform
84+ - name : Refresh terraform state
85+ if : ${{ github.event.inputs.refresh == 'true' }}
86+ run : |
87+ echo "{}" > $TF_WORKSPACE.tfstate.json
88+ terraform apply -refresh-only -auto-approve -lock=$TF_LOCK
89+ working-directory : terraform
8090 - name : Pull terraform state
8191 run : |
8292 terraform show -json > $TF_WORKSPACE.tfstate.json
You can’t perform that action at this time.
0 commit comments