bake: fix map type checking to detect matrix property set to list

Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
Justin Chadwell
2023-04-05 12:59:32 +01:00
parent a3293cdaaa
commit 9827abbf76
2 changed files with 19 additions and 1 deletions

View File

@@ -820,7 +820,7 @@ func (t *Target) GetEvalContexts(ectx *hcl.EvalContext, block *hcl.Block, loadDe
return nil, err
}
if !value.CanIterateElements() {
if !value.Type().IsMapType() && !value.Type().IsObjectType() {
return nil, errors.Errorf("matrix must be a map")
}
matrix := value.AsValueMap()