Skip to content

destroy

destroy #3

Workflow file for this run

name: destroy
on:
workflow_dispatch:
jobs:
destroy:
runs-on: ubuntu-latest
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_ROLE_DEPLOY }}
aws-region: ${{ vars.AWS_REGION }}
- name: OpenAPI Generator
uses: hatamiarash7/openapi-generator@v0.3.0
with:
generator: openapi
openapi-file: openapi/openapi.yaml
output-dir: openapi/.generated
- 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
working-directory: terraform
- name: Terraform Destroy
run: terraform destroy -auto-approve -var-file=environment/live.tfvars
working-directory: terraform