Skip to content

Destroy

Destroy #3

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: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- 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: arn:aws:iam::202062340677:role/TechChallengeAuthDeployer
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