HashiCorp Certified: Terraform Associate — Question 257

You can reference a resource created with for_each using a Splat (*) expression.

Answer options

Correct answer: B

Explanation

The correct answer is B, as Splat expressions cannot be used to reference resources created with for_each due to the way that for_each manages instances. Instead, each instance must be referenced directly using its specific key.