-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
complex.variant
58 lines (48 loc) · 889 Bytes
/
complex.variant
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
description = "desc for default"
parameter def1 {
description = "defa1"
type = string
default = try(jsonpath(file("foo.json"), "foo.bar"), file("foo.txt"), "def1default")
}
parameter param1 {
description = "param1"
type = string
default = "aa"
}
variable lis {
// type = list(string)
type = tuple([string,string])
value = [
"a",
"b"]
}
variable mm {
// type = map(string)
type = object({foo=string})
value = {
foo = "bar"
}
}
job "echo" {
parameter "script" {
type = string
}
exec {
command = "echo"
args = [
param.script]
}
}
job "main" {
option opt1 {
type = string
description = "opt1"
}
variable var1 {
type = string
value = "var1:param1=${param.param1},opt1=${opt.opt1},def1=${param.def1}"
}
run "echo" {
script = "param1=${param.param1},var1=${var.var1},mm=${var.mm["foo"]}"
}
}