Skip to content

Commit 4646721

Browse files
Create destroy.yml
1 parent cddc46e commit 4646721

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/destroy.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Terraform Destroy
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
tf-destroy:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: checkout repositry
11+
uses: actions/checkout@v3
12+
13+
- name: Set up Terraform
14+
uses: hashicorp/setup-terraform@v3
15+
16+
- name: Configure AWS credentials
17+
uses: aws-actions/configure-aws-credentials@v2
18+
with:
19+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
20+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
21+
aws-region: ap-south-1
22+
23+
- name: Terraform Init
24+
run: terraform init
25+
26+
- name: Terraform destroy
27+
id: destroy
28+
run: terraform destroy -var-file "terraform.tfvars" -auto-approve

0 commit comments

Comments
 (0)