Skip to content

Commit

Permalink
Spiffy comment
Browse files Browse the repository at this point in the history
  • Loading branch information
pselle committed Aug 28, 2019
1 parent 35016a5 commit 37e8147
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion terraform/eval_for_each.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ func evaluateResourceForEachExpressionKnown(expr hcl.Expression, ctx EvalContext
return nil, true, diags
}

// For sets, we need to recursively check ...and add reasoning why this works here
// A set may contain unknown values that must be
// discovered by checking with IsWhollyKnown (which iterates through the
// structure), while for maps in cty, keys can never be unknown or null,
// thus the earlier IsKnown check suffices for maps
if !forEachVal.IsWhollyKnown() {
return map[string]cty.Value{}, false, diags
}
Expand Down

0 comments on commit 37e8147

Please sign in to comment.