Skip to content

Commit e1ee9db

Browse files
committed
Add connections
1 parent 185b113 commit e1ee9db

File tree

1 file changed

+8
-23
lines changed

1 file changed

+8
-23
lines changed

testdata/connections/main.tf

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,40 +20,25 @@ locals {
2020

2121
used_words = setunion(
2222
[],
23-
jsondecode(data.coder_parameter.yellow.value),
24-
jsondecode(data.coder_parameter.green.value),
23+
# jsondecode(data.coder_parameter.yellow.value),
24+
# jsondecode(data.coder_parameter.green.value),
2525
)
2626

2727
available_words = setsubtract(toset(local.word_bank), toset(local.used_words))
2828
}
2929

30-
data "coder_parameter" "yellow" {
31-
name = "yellow"
30+
data "coder_parameter" "rows" {
31+
for_each = ["yellow", "green", "blue", "purple"]
32+
name = each.value
33+
# name = "rows"
3234
display_name = "Row"
3335
type = "list(string)"
3436
form_type = "multi-select"
35-
# default = "[]"
37+
default = "[]"
3638

3739
dynamic "option" {
3840
# for_each = tolist(setsubtract(toset(local.word_bank), toset(local.used_words)))
39-
for_each = local.word_bank
40-
content {
41-
name = option.value
42-
value = option.value
43-
}
44-
}
45-
}
46-
47-
data "coder_parameter" "green" {
48-
name = "green"
49-
display_name = "Row"
50-
type = "list(string)"
51-
form_type = "multi-select"
52-
# default = "[]"
53-
54-
dynamic "option" {
55-
# for_each = tolist(setsubtract(toset(local.word_bank), toset(local.used_words)))
56-
for_each = local.word_bank
41+
for_each = local.available_words
5742
content {
5843
name = option.value
5944
value = option.value

0 commit comments

Comments
 (0)