Skip to content

Commit 242e196

Browse files
committed
updated workflow
1 parent 82d1cc2 commit 242e196

File tree

3 files changed

+24
-5
lines changed

3 files changed

+24
-5
lines changed

.github/workflows/stackql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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'

stackql/scripts/check-terraform-instances/check-terraform-instances.iql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<<<jsonnet
22
{
33
project: 'stackql-demo-2',
4-
zone: 'australia-southeast1-b',
4+
zone: 'australia-southeast1-c',
55
nameLike: 'terraform-',
66
}
77
>>>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+

0 commit comments

Comments
 (0)