mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 01:41:48 -06:00
Docs around splat
This commit is contained in:
parent
0d4ea7d9ad
commit
566f22a34e
@ -317,6 +317,10 @@ be accessed using a [`for` expression](#for-expressions).
|
|||||||
* `[for value in aws_instance.example: value.id]` returns a list of all of the ids
|
* `[for value in aws_instance.example: value.id]` returns a list of all of the ids
|
||||||
of each of the instances.
|
of each of the instances.
|
||||||
|
|
||||||
|
Note that unlike `count`, splat expressions are _not_ directly applicable to resources managed with `for_each`, as splat expressions are for lists only. You may apply a splat expression to values in a map like so:
|
||||||
|
|
||||||
|
* `values(aws_instance.example)[*].id`
|
||||||
|
|
||||||
### Local Named Values
|
### Local Named Values
|
||||||
|
|
||||||
Within the bodies of certain expressions, or in some other specific contexts,
|
Within the bodies of certain expressions, or in some other specific contexts,
|
||||||
|
Loading…
Reference in New Issue
Block a user