mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-25 08:21:07 -06:00
Merge pull request #31149 from hashicorp/docs-for-each-list-toset
fix(docs): change set to list when recommending using toset()
This commit is contained in:
commit
c3c6f8327f
@ -133,11 +133,11 @@ can't refer to any resource attributes that aren't known until after a
|
||||
configuration is applied (such as a unique ID generated by the remote API when
|
||||
an object is created).
|
||||
|
||||
The `for_each` value must be a map or set with one element per desired
|
||||
resource instance. When providing a set, you must use an expression that
|
||||
explicitly returns a set value, like the [`toset`](/language/functions/toset)
|
||||
function; to prevent unwanted surprises during conversion, the `for_each`
|
||||
argument does not implicitly convert lists or tuples to sets.
|
||||
The `for_each` value must be a map or set with one element per desired resource
|
||||
instance. To use a sequence as the `for_each` value, you must use an expression
|
||||
that explicitly returns a set value, like the [toset](/language/functions/toset)
|
||||
function. To prevent unwanted surprises during conversion, the `for_each` argument
|
||||
does not implicitly convert lists or tuples to sets.
|
||||
If you need to declare resource instances based on a nested
|
||||
data structure or combinations of elements from multiple data structures you
|
||||
can use Terraform expressions and functions to derive a suitable value.
|
||||
|
Loading…
Reference in New Issue
Block a user