File tree Expand file tree Collapse file tree 3 files changed +24
-5
lines changed
check-terraform-instances Expand file tree Collapse file tree 3 files changed +24
-5
lines changed Original file line number Diff line number Diff line change @@ -127,8 +127,8 @@ jobs:
127127 test_query_file_path : ' ./stackql/scripts/run-compliance-checks/run-compliance-checks.iql'
128128 expected_rows : 0
129129
130- - name : " [CLEANUP] terraform destroy "
130+ - name : " [CLEANUP] delete instances and bucket using stackql-exec "
131131 if : failure()
132- env :
133- TF_VAR_google_credentials : ${{ secrets.GOOGLE_CREDENTIALS }}
134- run : cd terraform; terraform destroy -auto-approve
132+ uses : stackql/stackql-exec@v1.3.1
133+ with :
134+ query_file_path : ' ./stackql/scripts/ terraform-cleanup/terraform-cleanup.iql '
Original file line number Diff line number Diff line change 11<<<jsonnet
22{
33 project: 'stackql-demo-2',
4- zone: 'australia-southeast1-b ',
4+ zone: 'australia-southeast1-c ',
55 nameLike: 'terraform-',
66}
77>>>
Original file line number Diff line number Diff line change 1+ DELETE FROM google.compute.instances
2+ WHERE project = 'stackql-demo-2'
3+ AND zone = 'australia-southeast1-c'
4+ AND instance = 'terraform-test-1';
5+
6+ DELETE FROM google.compute.instances
7+ WHERE project = 'stackql-demo-2'
8+ AND zone = 'australia-southeast1-c'
9+ AND instance = 'terraform-test-2';
10+
11+ DELETE FROM google.compute.instances
12+ WHERE project = 'stackql-demo-2'
13+ AND zone = 'australia-southeast1-c'
14+ AND instance = 'terraform-test-3';
15+
16+ DELETE FROM google.storage.buckets
17+ WHERE bucket = 'stackql-demo-public-access-not-enforced';
18+
19+
You can’t perform that action at this time.
0 commit comments