File tree 1 file changed +8
-6
lines changed 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -28,27 +28,29 @@ Authentication to StackQL providers is done via environment variables source fro
28
28
```
29
29
<<<jsonnet
30
30
local project = std.extVar("GOOGLE_PROJECT");
31
+ local zone = std.extVar("GOOGLE_ZONE");
31
32
{
32
33
project: project,
34
+ zone: zone,
33
35
}
34
36
>>>
35
- REGISTRY PULL google;
36
37
SELECT status, count(*) as num_instances
37
38
FROM google.compute.instances
38
- WHERE project = '{{ .project }}'
39
+ WHERE project = '{{ .project }}' and zone = '{{ .zone }}'
39
40
GROUP BY status;
40
41
```
41
42
** Example**
42
43
```
43
- - name: exec google example
44
+ - name: exec google example with query file using vars
45
+ id: stackql-exec-file-with-vars
44
46
uses: ./
45
47
with:
46
48
query_file_path: './stackql_scripts/google-example.iql'
47
- vars: GOOGLE_PROJECT=$GOOGLE_PROJECT, GOOGLE_ZONE=$GOOGLE_ZONE
49
+ vars: GOOGLE_PROJECT=${{ env. GOOGLE_PROJECT }}, GOOGLE_ZONE=${{ env. GOOGLE_ZONE }}
48
50
env:
49
51
GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }}
50
- GOOGLE_PROJECT: ${{ secrets .GOOGLE_PROJECT }}
51
- GOOGLE_ZONE: ${{ secrets .GOOGLE_ZONE }}
52
+ GOOGLE_PROJECT: ${{ vars .GOOGLE_PROJECT }}
53
+ GOOGLE_ZONE: ${{ vars .GOOGLE_ZONE }}
52
54
```
53
55
54
56
## Inputs
You can’t perform that action at this time.
0 commit comments