Skip to content

Commit

Permalink
Merge pull request #5 from datarootsio/feature/destroy
Browse files Browse the repository at this point in the history
destroy resources
  • Loading branch information
LidiaBaciu authored Dec 21, 2022
2 parents c074ae7 + 20eb9e7 commit 857eb2b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Deploy staging"
name: "Destroy staging"
on:
push:
branches:
Expand All @@ -7,7 +7,7 @@ env:
tf_version: 'latest'
jobs:
apply-staging:
name: Terraform Apply Staging
name: Terraform Destroy Staging
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -26,12 +26,9 @@ jobs:
SNOWFLAKE_PRIVATE_KEY: ${{ secrets.SNOWFLAKE_PRIVATE_KEY }}
TF_VAR_sas_token_sensors_sandbox: ${{ secrets.SAS_TOKEN_SENSORS_SANDBOX }}
TF_VAR_sas_token_predictions_sandbox: ${{ secrets.SAS_TOKEN_PREDICTIONS_SANDBOX }}
- name: Terraform Format
id: format
run: terraform fmt -check -recursive
- name: Terraform Apply
id: apply
run: terraform apply -var-file vars/staging.tfvars -auto-approve
- name: Terraform destroy
id: destroy
run: terraform apply -destroy -var-file vars/staging.tfvars -auto-approve
env:
ARM_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Deploy prod"
name: "Destroy prod"
on:
push:
tags:
Expand Down Expand Up @@ -28,7 +28,7 @@ jobs:
ARM_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
- name: Terraform Apply
id: apply
run: terraform apply -var-file vars/prod.tfvars -auto-approve
run: terraform apply -destroy -var-file vars/prod.tfvars -auto-approve
env:
ARM_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
Expand Down

0 comments on commit 857eb2b

Please sign in to comment.