File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -238,6 +238,24 @@ jobs:
238238 terraform apply -auto-approve
239239 fi
240240
241+ - name : Find Errored Terraform State
242+ if : ${{ always() }}
243+ run : |
244+ cd ${{ inputs.working_directory }}
245+ if [ -f "errored.tfstate" ]; then
246+ ls -la errored.tfstate
247+ echo "Uploading errored.tfstate as artifact..."
248+ else
249+ echo "Errored Terraform state file not found."
250+ fi
251+
252+ - name : Upload Errored Terraform State Artifact
253+ if : ${{ always() }} && success() && steps.find_errored_tfstate.outputs['errored_found'] == 'true'
254+ uses : actions/upload-artifact@v4
255+ with :
256+ name : errored_tfstate
257+ path : ${{ inputs.working_directory }}/errored.tfstate
258+
241259 - name : Terraform destroy
242260 if : ${{ inputs.destroy == true }}
243261 id : destroy
Original file line number Diff line number Diff line change 1111 type : string
1212 default : ' ./examples/complete/'
1313 provider :
14- required : true
14+ required : false
1515 type : string
16- default : gcp
1716 description : ' Cloud provider to run the workflow. e.g. azurerm or aws or gcp'
1817 terraform_version :
1918 description : ' Terraform version to use. Leave empty for the latest version.'
You can’t perform that action at this time.
0 commit comments