Skip to content

Commit

Permalink
workflow changes
Browse files Browse the repository at this point in the history
  • Loading branch information
flavius-dinu committed May 17, 2024
1 parent c75ab38 commit 96e7b75
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/terraform_destroy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Terraform Destroy

on:
workflow_dispatch:


jobs:
terraform:
name: "Terraform deploy"
runs-on: ubuntu-latest
defaults:
run:
shell: bash
# We keep Terraform files in the terraform directory.
working-directory: ./terraform

steps:
- name: Checkout the repository to the runner
uses: actions/checkout@v2

- name: Setup Terraform with specified version on the runner
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.5.7
terraform_wrapper: false

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
aws-session-token: ${{ secrets.AWS_SESSION_TOKEN }}

- name: Terraform destroy
id: destroy
run: terraform destroy -auto-approve

0 comments on commit 96e7b75

Please sign in to comment.