Update HCL to handle type mismatches when applying defaults (#32775)

* add test reproducing terraform crash

* pull latest hcl

* add missing go.sum file

* also fix tests broken by go-cty update
This commit is contained in:
Liam Cervante
2023-03-09 14:29:58 +01:00
committed by GitHub
parent 36aac6b498
commit 32f151f20b
4 changed files with 57 additions and 23 deletions

View File

@@ -68,7 +68,7 @@ func TestLength(t *testing.T) {
},
{
cty.UnknownVal(cty.List(cty.Bool)),
cty.UnknownVal(cty.Number),
cty.UnknownVal(cty.Number).Refine().NotNull().NumberRangeInclusive(cty.NumberIntVal(0), cty.NumberIntVal(math.MaxInt64)).NewValue(),
},
{
cty.DynamicVal,
@@ -117,7 +117,7 @@ func TestLength(t *testing.T) {
},
{
cty.UnknownVal(cty.String),
cty.UnknownVal(cty.Number),
cty.UnknownVal(cty.Number).Refine().NotNull().NumberRangeLowerBound(cty.NumberIntVal(0), true).NewValue(),
},
{
cty.DynamicVal,