terraform/website/docs/language/expressions
Martin Atkins f47c4efb1b website: Dynamic blocks can for_each any collection type
We previously added a hint to both resource for_each and dynamic blocks
about using the "flatten" and "setproduct" situations to construct
suitable collections to repeat over.

However, we used the same text in both places which ended up stating that
dynamic blocks can only accept map or set values, which is a constraint
that applies to resource for_each (because we need to assign a unique
identifier to each instance) and not to dynamic blocks (which don't have
any uniqueness enforced by Terraform Core itself).

To remove that contradiction with the text above which talks about what
is valid here, I've just generalized this to say "collection", because
the primary point of this paragraph is the "one element per desired nested
block" part, not specifically what sort of collections are permitted in
this location. (Text further up describes the supported types.)
2021-03-30 09:43:33 -07:00
..
conditionals.html.md website: Language: Update links to moved pages 2021-01-22 12:22:21 -08:00
dynamic-blocks.html.md website: Dynamic blocks can for_each any collection type 2021-03-30 09:43:33 -07:00
for.html.md website: Language: Update links to moved pages 2021-01-22 12:22:21 -08:00
function-calls.html.md website: Language: Update links to moved pages 2021-01-22 12:22:21 -08:00
index.html.md website: CLI: Update links to moved docs pages 2021-01-22 12:22:21 -08:00
operators.html.md website: Language: Update links to moved pages 2021-01-22 12:22:21 -08:00
references.html.md Update documentation for provider_sensitive_attrs experiment 2021-03-16 13:31:43 -04:00
splat.html.md website: Language: Update links to moved pages 2021-01-22 12:22:21 -08:00
strings.html.md website: Language: Update links to moved pages 2021-01-22 12:22:21 -08:00
type-constraints.html.md website: Language: Update links to moved pages 2021-01-22 12:22:21 -08:00
types.html.md website: Language: Update links to moved pages 2021-01-22 12:22:21 -08:00
version-constraints.html.md website: Language: Update links to moved pages 2021-01-22 12:22:21 -08:00