Skip to content

Commit

Permalink
Merge pull request #22279 from tmatias/for-each-argument-value-valida…
Browse files Browse the repository at this point in the history
…tion

make diagnose on for_each argument more precise
  • Loading branch information
Pam Selle authored Aug 1, 2019
2 parents 5cb80c4 + c20c40c commit 07ee88b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion terraform/eval_for_each.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 07ee88b

Please sign in to comment.