Destroy AWS Environment #24
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: 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 |