Skip to content

Commit a04ffa6

Browse files
committed
push up an example multi select
1 parent 18c3d05 commit a04ffa6

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

examples/data-sources/coder_parameter/data-source.tf

+32
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,36 @@ data "coder_parameter" "home_volume_size" {
114114
validation {
115115
monotonic = "increasing"
116116
}
117+
}
118+
119+
data "coder_parameter" "tools" {
120+
name = "Tools"
121+
description = "What tools do you want to install?"
122+
type = "list(string)"
123+
form_type = "multi-select"
124+
stying = jsonencode({
125+
disabled = false
126+
})
127+
default = jsonencode(["git", "docker"])
128+
129+
option {
130+
value = "Docker"
131+
name = "docker"
132+
icon = "/icon/docker.svg"
133+
}
134+
option {
135+
value = "Git"
136+
name = "git"
137+
icon = "/icon/git.svg"
138+
}
139+
option {
140+
value = "Golang"
141+
name = "go"
142+
icon = "/icon/go.svg"
143+
}
144+
option {
145+
value = "Typescript"
146+
name = "ts"
147+
icon = "/icon/typescript.svg"
148+
}
117149
}

0 commit comments

Comments
 (0)