Commit ae780eb
authored
Explicitely type tag map variables in oke submodule (#709)
When trying to update defined_tags on a cluster, via the configuration:
```
defined_tags = {
oke = {
cluster = {
"NEW_KEY" = "NEW_TAG"
}
persistent_volume = {
"NEW_KEY" = "NEW_TAG"
}
service_lb = {
"NEW_KEY" = "NEW_TAG"
}
node_pool = {
"NEW_KEY" = "NEW_TAG"
}
node = {
"NEW_KEY" = "NEW_TAG"
}
}
}
```
one gets these errors for the cluster, persistent_volume, service_lb parts:
```
defined_tags = lookup(var.defined_tags, "<PART>", {})
Invalid value for "default" parameter: the default value must have the same type as the map elements.
```
this is because terrafrom cannot reconciliate the map string->string type of the tags submaps
with the type of the empty map.
Fix this as outlined in hashicorp/terraform#27509
by explicitely typing the submap variables.
node_pool and node do not suffer the same issue, as I assume the merge function does cleverer
overload resolution, but more precision doesn't hurt.
Signed-off-by: Andrea Stacchiotti <[email protected]>1 parent 0a95fce commit ae780eb
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
141 | 141 | | |
0 commit comments