Question 650
A set of compute instances is created with for_each, and a new rule must reference the instance keyed as analytics. Which failure mode would most clearly show that this specific requirement remains unmet?
Explanation
Correct Answer
For_each resource instances are addressed by their keys, not by guessed list positions. Use the indexed resource instance address for the analytics key.
Incorrect Answers
Terraform supports explicit variable files for environment parameterization. The rule resolves the analytics instance's current computed ID.
Preconditions verify assumptions before eligible managed operations. Use the indexed resource instance address for the analytics key.
Terraform-managed resources participate in create, update, and destroy lifecycle decisions. For_each resource instances are addressed by their keys, not by guessed list positions.