Destroy #2
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: | |
terraform: | |
name: "Terraform deploy" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
# We keep Terraform files in the terraform directory. | |
working-directory: ./terraform | |
steps: | |
- name: Checkout the repository to the runner | |
uses: actions/checkout@v2 | |
- name: Setup Terraform with specified version on the runner | |
uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: 1.5.7 | |
terraform_wrapper: false | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
aws-session-token: ${{ secrets.AWS_SESSION_TOKEN }} | |
- name: Terraform destroy | |
id: destroy | |
run: terraform destroy -auto-approve | |