-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c75ab38
commit 96e7b75
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
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
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 | ||
|