-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (34 loc) · 1.19 KB
/
instance-destroy-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: "Instance - destroy test"
on:
pull_request:
types: [closed]
branches: [main]
jobs:
destroy-terraform-test:
environment: test
env:
ARM_CLIENT_ID: ${{ secrets.TF_VAR_AGENT_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.TF_VAR_AGENT_CLIENT_SECRET }}
ARM_SUBSCRIPTION_ID: ${{ secrets.TF_VAR_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.TF_VAR_TENANT_ID }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: "./terraform"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_wrapper: false
- name: Terraform Init
run: terraform -chdir=instance init -backend-config="container_name=onlinestoretfstate-test" -backend-config="key=terraform.tfstate.${{ github.head_ref }}"
- name: Terraform Destroy
run: terraform -chdir=instance destroy -auto-approve
env:
TF_VAR_acr_username: "not-used"
TF_VAR_acr_password: "not-used"
TF_VAR_website_dns_subdomain: "not-used"
TF_VAR_api_dns_subdomain: "not-used"
TF_VAR_monitoring_dns_subdomain: "not-used"