Skip to content

Destroy AWS Environment #24

Destroy AWS Environment

Destroy AWS Environment #24

name: Destroy AWS Environment
on:
workflow_dispatch:
jobs:
destroy_aws_env:
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
runs-on: ubuntu-latest # runner
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.1.8
- name: Create AWS credentials files
run: sh ./scripts/aws/create_files.sh
- name: Initialize terraform
run: sh ./scripts/terraform/init.sh
- name: Destroy AWS infrastructure
run: TF_VAR_instance=t3a.xlarge sh ./scripts/terraform/destroy.sh