make validation on for_each argument more precise
This commit is contained in:
parent
5cb80c43c1
commit
e825dd0428
|
@ -54,7 +54,7 @@ func evaluateResourceForEachExpressionKnown(expr hcl.Expression, ctx EvalContext
|
|||
return map[string]cty.Value{}, false, diags
|
||||
}
|
||||
|
||||
if !forEachVal.CanIterateElements() || forEachVal.Type().IsListType() {
|
||||
if !forEachVal.Type().IsMapType() && !forEachVal.Type().IsSetType() {
|
||||
diags = diags.Append(&hcl.Diagnostic{
|
||||
Severity: hcl.DiagError,
|
||||
Summary: "Invalid for_each argument",
|
||||
|
|
Loading…
Reference in New Issue