Skip to content

Destroy

Destroy #2

Workflow file for this run

name: Destroy
on:
workflow_dispatch:
jobs:
destroy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: terraform
permissions:
id-token: write
contents: read
pull-requests: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ vars.AWS_IAM_ROLE }}
aws-region: ${{ vars.AWS_REGION }}
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
cli_config_credentials_token: ${{ secrets.TF_CLOUD_USER_API_TOKEN }}
- name: Terraform Init
run: terraform init
- name: Terraform Destroy
run: terraform destroy -auto-approve