-
Notifications
You must be signed in to change notification settings - Fork 41
/
main.pp
44 lines (42 loc) · 1.04 KB
/
main.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
resource aResourceWithForeachMap "simple:index:resource" {
options {
range = {
cruel: "world"
good: "class"
}
}
inputOne = "Hello ${range.key} ${range.value}"
inputTwo = 0
}
output someOutputA {
value = aResourceWithForeachMap["cruel"].result
}
aDataSourceWithForeachMap =[for __key, __value in {
cruel: "world"
good: "class"
}
: invoke("simple:index:data_source", {
inputOne = "Hello ${__key} ${__value}",
inputTwo = true
})]
output someOutputB {
value = aDataSourceWithForeachMap["cruel"].result
}
resource aResourceWithForeachArray "simple:index:resource" {
options {
range = ["cruel", "good"]
}
inputOne = "Hello ${range.value} world"
inputTwo = true
}
output someOutputC {
value = aResourceWithForeachArray["good"].result
}
aDataSourceWithForeachArray =[for __key, __value in ["cruel", "good"]
: invoke("simple:index:data_source", {
inputOne = "Hello ${__value} world",
inputTwo = true
})]
output someOutputD {
value = aDataSourceWithForeachArray["good"].result
}