@@ -67,62 +67,62 @@ jobs:
6767 data_file_path : ' ./stackql/data/vars.jsonnet'
6868 vars : GOOGLE_PROJECT=${{ env.GOOGLE_PROJECT }},GOOGLE_ZONE=${{ env.GOOGLE_ZONE }}
6969
70- # stackql-actions-with-terraform-demo:
71- # name: stackql actions with terraform demo
72- # runs-on: ubuntu-latest
73- # env:
74- # GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }}
75- # GOOGLE_PROJECT: ${{ vars.GOOGLE_PROJECT }}
76- # GOOGLE_ZONE: ${{ vars.GOOGLE_ZONE }}
77-
78- # steps:
79- # - uses: actions/checkout@v3
80- # name: checkout repo
81- # with:
82- # fetch-depth: 0
83-
84- # - name: setup StackQL
85- # uses: stackql/setup-stackql@v1.2.0
86- # with:
87- # use_wrapper: true
88-
89- # - name: pull Google docs
90- # uses: stackql/stackql-exec@v1.3.1
91- # with:
92- # query: "REGISTRY PULL google"
93-
94- # - uses: hashicorp/setup-terraform@v2
95-
96- # - name: Terraform Init
97- # id: init
98- # run: cd terraform; terraform init
99-
100- # - name: Terraform Validate
101- # env:
102- # TF_VAR_google_credentials: ${{ secrets.GOOGLE_CREDENTIALS }}
103- # id: validate
104- # run: cd terraform; terraform validate -no-color
105-
106- # - name: Terraform Plan
107- # env:
108- # TF_VAR_google_credentials: ${{ secrets.GOOGLE_CREDENTIALS }}
109- # id: plan
110- # run: cd terraform; terraform plan -no-color -var-file=stackql-demo.tfvars
111-
112- # - name: Terraform Apply
113- # env:
114- # TF_VAR_google_credentials: ${{ secrets.GOOGLE_CREDENTIALS }}
115- # id: apply
116- # run: cd terraform; terraform apply -no-color -var-file=stackql-demo.tfvars -auto-approve
117-
118- # - name: check terraform deployment using stackql-assert - should pass
119- # uses: stackql/stackql-assert@v1.3.2
120- # with:
121- # test_query_file_path: './stackql/scripts/check-terraform-instances/check-terraform-instances.iql'
122- # expected_results_str: '[{"name":"terraform-test-1","name":"terraform-test-2"}]'
123-
124- # - name: run a compliance check using stackql-assert - should fail
125- # uses: stackql/stackql-assert@v1.3.2
126- # with:
127- # test_query_file_path: './stackql/scripts/run-compliance-checks/run-compliance-checks.iql'
128- # expected_rows: 0
70+ stackql-actions-with-terraform-demo :
71+ name : stackql actions with terraform demo
72+ runs-on : ubuntu-latest
73+ env :
74+ GOOGLE_CREDENTIALS : ${{ secrets.GOOGLE_CREDENTIALS }}
75+ GOOGLE_PROJECT : ${{ vars.GOOGLE_PROJECT }}
76+ GOOGLE_ZONE : ${{ vars.GOOGLE_ZONE }}
77+
78+ steps :
79+ - uses : actions/checkout@v3
80+ name : checkout repo
81+ with :
82+ fetch-depth : 0
83+
84+ - name : setup StackQL
85+ uses : stackql/setup-stackql@v1.2.0
86+ with :
87+ use_wrapper : true
88+
89+ - name : pull Google docs
90+ uses : stackql/stackql-exec@v1.3.1
91+ with :
92+ query : " REGISTRY PULL google"
93+
94+ - uses : hashicorp/setup-terraform@v2
95+
96+ - name : Terraform Init
97+ id : init
98+ run : cd terraform; terraform init
99+
100+ - name : Terraform Validate
101+ env :
102+ TF_VAR_google_credentials : ${{ secrets.GOOGLE_CREDENTIALS }}
103+ id : validate
104+ run : cd terraform; terraform validate -no-color
105+
106+ - name : Terraform Plan
107+ env :
108+ TF_VAR_google_credentials : ${{ secrets.GOOGLE_CREDENTIALS }}
109+ id : plan
110+ run : cd terraform; terraform plan -no-color -var-file=stackql-demo.tfvars
111+
112+ - name : Terraform Apply
113+ env :
114+ TF_VAR_google_credentials : ${{ secrets.GOOGLE_CREDENTIALS }}
115+ id : apply
116+ run : cd terraform; terraform apply -no-color -var-file=stackql-demo.tfvars -auto-approve
117+
118+ - name : check terraform deployment using stackql-assert - should pass
119+ uses : stackql/stackql-assert@v1.3.2
120+ with :
121+ test_query_file_path : ' ./stackql/scripts/check-terraform-instances/check-terraform-instances.iql'
122+ expected_results_str : ' [{"name":"terraform-test-1","name":"terraform-test-2"}]'
123+
124+ - name : run a compliance check using stackql-assert - should fail
125+ uses : stackql/stackql-assert@v1.3.2
126+ with :
127+ test_query_file_path : ' ./stackql/scripts/run-compliance-checks/run-compliance-checks.iql'
128+ expected_rows : 0
0 commit comments