invalidForEachDetail:=fmt.Sprintf("The for_each expression must produce either a map of any type or a set of strings. The keys of the map or the set elements will serve as unique identifiers for multiple instances of this %s.",callerDiagName)
constsensitiveForEachDetail="Sensitive values, or values derived from sensitive values, cannot be used as for_each arguments. If used, the sensitive value could be exposed as a resource instance key."
switch{
caseresult.Value.HasMark(marks.Sensitive):
casemarks.Has(result.Value,marks.Sensitive):
// Sensitive values are not allowed as for_each arguments because
// they could be exposed as resource instance keys.
// TODO: This should have Extra: tdiagnosticCausedBySensitive(true),