Skip to content

Commit 9e711ee

Browse files
committed
updated README
1 parent 889b6e7 commit 9e711ee

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,29 @@ Authentication to StackQL providers is done via environment variables source fro
2828
```
2929
<<<jsonnet
3030
local project = std.extVar("GOOGLE_PROJECT");
31+
local zone = std.extVar("GOOGLE_ZONE");
3132
{
3233
project: project,
34+
zone: zone,
3335
}
3436
>>>
35-
REGISTRY PULL google;
3637
SELECT status, count(*) as num_instances
3738
FROM google.compute.instances
38-
WHERE project = '{{ .project }}'
39+
WHERE project = '{{ .project }}' and zone = '{{ .zone }}'
3940
GROUP BY status;
4041
```
4142
**Example**
4243
```
43-
- name: exec google example
44+
- name: exec google example with query file using vars
45+
id: stackql-exec-file-with-vars
4446
uses: ./
4547
with:
4648
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 }}
4850
env:
4951
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 }}
5254
```
5355

5456
## Inputs

0 commit comments

Comments
 (0)