Commit 10ae444
committed
Upgrade HCL to fix optional attr default crash
Also add regression test coverage of the crash. This would occur when
objects with optional attributes had default values of different type
from the attribute type, and the objects were members of a collection.
For example:
list(object({
a = optional(set(string), [])
}))
If this type constraint is applied to a variable value where one object
has a set(string) value for a, and the other object applies the empty
tuple default, Terraform would crash.1 parent 1e6f091 commit 10ae444
3 files changed
+67
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
390 | | - | |
391 | | - | |
| 390 | + | |
| 391 | + | |
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12165 | 12165 | | |
12166 | 12166 | | |
12167 | 12167 | | |
| 12168 | + | |
| 12169 | + | |
| 12170 | + | |
| 12171 | + | |
| 12172 | + | |
| 12173 | + | |
| 12174 | + | |
| 12175 | + | |
| 12176 | + | |
| 12177 | + | |
| 12178 | + | |
| 12179 | + | |
| 12180 | + | |
| 12181 | + | |
| 12182 | + | |
| 12183 | + | |
| 12184 | + | |
| 12185 | + | |
| 12186 | + | |
| 12187 | + | |
| 12188 | + | |
| 12189 | + | |
| 12190 | + | |
| 12191 | + | |
| 12192 | + | |
| 12193 | + | |
| 12194 | + | |
| 12195 | + | |
| 12196 | + | |
| 12197 | + | |
| 12198 | + | |
| 12199 | + | |
| 12200 | + | |
| 12201 | + | |
| 12202 | + | |
| 12203 | + | |
| 12204 | + | |
| 12205 | + | |
| 12206 | + | |
| 12207 | + | |
| 12208 | + | |
| 12209 | + | |
| 12210 | + | |
| 12211 | + | |
| 12212 | + | |
| 12213 | + | |
| 12214 | + | |
| 12215 | + | |
| 12216 | + | |
| 12217 | + | |
| 12218 | + | |
| 12219 | + | |
| 12220 | + | |
| 12221 | + | |
| 12222 | + | |
| 12223 | + | |
| 12224 | + | |
| 12225 | + | |
| 12226 | + | |
| 12227 | + | |
| 12228 | + | |
| 12229 | + | |
| 12230 | + | |
| 12231 | + | |
12168 | 12232 | | |
12169 | 12233 | | |
12170 | 12234 | | |
| |||
0 commit comments