mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-24 16:10:46 -06:00
Merge pull request #22279 from tmatias/for-each-argument-value-validation
make diagnose on for_each argument more precise
This commit is contained in:
commit
07ee88b73b
@ -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.CanIterateElements() || forEachVal.Type().IsListType() || forEachVal.Type().IsTupleType() {
|
||||
diags = diags.Append(&hcl.Diagnostic{
|
||||
Severity: hcl.DiagError,
|
||||
Summary: "Invalid for_each argument",
|
||||
|
Loading…
Reference in New Issue
Block a user