File tree 5 files changed +52
-1
lines changed
tests/fixtures/scenarios/atmos-include-yaml-function
5 files changed +52
-1
lines changed Original file line number Diff line number Diff line change @@ -19,3 +19,12 @@ stacks:
19
19
logs :
20
20
file : " /dev/stderr"
21
21
level : Info
22
+
23
+
24
+ templates :
25
+ settings :
26
+ enabled : true
27
+ sprig :
28
+ enabled : true
29
+ gomplate :
30
+ enabled : true
Original file line number Diff line number Diff line change 6
6
" b" ,
7
7
" c"
8
8
],
9
+ "other_list_var" : [
10
+ " d" ,
11
+ " e" ,
12
+ " f"
13
+ ],
14
+ "list_objects" : [
15
+ {
16
+ "hyphenated-list-var" : [
17
+ " x" ,
18
+ " y" ,
19
+ " z"
20
+ ]
21
+ }
22
+ ],
9
23
"map_var" : {
10
24
"a" : 1 ,
11
25
"b" : 2 ,
Original file line number Diff line number Diff line change 1
1
string_var = " abc"
2
2
boolean_var = true
3
- list_var = [" a" , " b" , " c" ]
3
+ list_var = [" a" , " b" , " c" ]
4
4
map_var = {
5
5
a = 1
6
6
b = 2
7
7
c = 3
8
8
}
9
+ other_list_var : [
10
+ " d" ,
11
+ " e" ,
12
+ " f"
13
+ ]
14
+ list_objects : [
15
+ {
16
+ hyphenated- list - var : [
17
+ " x" ,
18
+ " y" ,
19
+ " z"
20
+ ]
21
+ }
22
+ ]
Original file line number Diff line number Diff line change @@ -8,3 +8,12 @@ map_var:
8
8
a : 1
9
9
b : 2
10
10
c : 3
11
+ other_list_var :
12
+ - d
13
+ - e
14
+ - f
15
+ list_objects :
16
+ - hyphenated-list-var :
17
+ - x
18
+ - y
19
+ - z
Original file line number Diff line number Diff line change @@ -14,3 +14,8 @@ components:
14
14
boolean_var : !include config/vars.yaml .boolean_var
15
15
list_var : !include config/vars.tfvars .list_var
16
16
map_var : !include config/vars.tfvars .map_var
17
+ # Relative paths are relative to the file containing the `!include` directive
18
+ complex_yq_var : !include '"../../config/vars.json" ".list_var + .other_list_var"'
19
+ hyphenated_list_var : !include '"../../config/vars.json" ".list_var + .other_list_var + .list_objects[0].hyphenated-list-var"'
20
+ # ## http include with space based jq filter requires triple quotes.
21
+ http_var : !include https://atmos.tools/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json """.definitions.backend_type.enum + .definitions.metadata.properties.type.enum"""'
You can’t perform that action at this time.
0 commit comments