HashiCorp
TERRAFORM-ASSOCIATE-003 · Question #28
You can reference a resource created with for_each using a Splat ( *) expression.
The correct answer is B. False. You cannot reference a resource created with for_each using a splat (*) expression, as it will not work with resources that have non-numeric keys. You need to use a for expression instead to iterate over the resource instances.
Read, generate, and modify configuration
Question
You can reference a resource created with for_each using a Splat ( *) expression.
Options
- ATrue
- BFalse
How the community answered
(38 responses)- A18% (7)
- B82% (31)
Explanation
You cannot reference a resource created with for_each using a splat (*) expression, as it will not work with resources that have non-numeric keys. You need to use a for expression instead to iterate over the resource instances.
Topics
#for_each#splat expression#resource addressing#meta-arguments
Community Discussion
No community discussion yet for this question.