Terraform Destroy #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Terraform Destroy | |
on: | |
workflow_dispatch: | |
jobs: | |
tf-destroy: | |
runs-on: ubuntu-latest | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: 'us-west-1' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Terraform | |
uses: hashicorp/setup-terraform@v1 | |
- name: Terraform Init | |
id: init | |
run: terraform init | |
- name: Show Destroy plan | |
run: terraform plan -destroy | |
continue-on-error: true | |
- name: Terraform destroy | |
id: destroy | |
run: terraform destroy -auto-approve |