HashiCorpHashiCorp
TERRAFORM-ASSOCIATE-004 · Question #28
TERRAFORM-ASSOCIATE-004 Question #28: Real Exam Question with Answer & Explanation
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.
Submitted by rohit_dlh· Apr 18, 2026Work with Terraform Configurations
Question
You can reference a resource created with for_each using a Splat ( *) expression.
Options
- ATrue
- BFalse
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 referencing#Collection types
Community Discussion
No community discussion yet for this question.