Question 340
The reliability team at Westfield Digital Systems is closing an incident described as follows: A list of indexed resources uses count but a caller references the whole group as if it were a single unindexed object. Which controlled check would validate the remediation?
Explanation
Correct Answer
Validation accepts the expression and the output contains the intended one or many instance IDs. This directly verifies the corrective action: Use the correct counted-resource index or an expression over instances when referencing their attributes. The measured result specifically addresses the failure at Westfield Digital Systems: A list of indexed resources uses count but a caller references the whole group as if it were a single unindexed object.
Incorrect Answers
A replacement plan shows the new instance scheduled before destruction of the old one and confirms naming constraints permit it. This evidence would validate a DIFFERENT correction: Consider lifecycle create_before_destroy where the provider and naming constraints permit parallel replacement. That different correction addresses: A database is replaced while an application requires the new endpoint to become available before the old instance is removed. It does not establish that the Westfield Digital Systems issue has been corrected: A list of indexed resources uses count but a caller references the whole group as if it were a single unindexed object. The relevant measured outcome is: Validation accepts the expression and the output contains the intended one or many instance IDs.
The failure can be diagnosed from redacted logs and no plaintext credential appears in the support ticket. This evidence would validate a DIFFERENT correction: Use controlled Terraform log settings and documented provider diagnostic methods without exposing credentials. That different correction addresses: An engineer attempts to debug a provider authentication issue by printing private keys directly in application code instead of using Terraform diagnostics. It does not establish that the Westfield Digital Systems issue has been corrected: A list of indexed resources uses count but a caller references the whole group as if it were a single unindexed object. The relevant measured outcome is: Validation accepts the expression and the output contains the intended one or many instance IDs.
The reviewed plan addresses the intended environment and matches its documented variable values. This evidence would validate a DIFFERENT correction: Supply the approved environment's input variables to planning and record the chosen workspace/backend. That different correction addresses: A deployment pipeline runs terraform plan with an old variable set and receives a plan for the wrong environment. It does not establish that the Westfield Digital Systems issue has been corrected: A list of indexed resources uses count but a caller references the whole group as if it were a single unindexed object. The relevant measured outcome is: Validation accepts the expression and the output contains the intended one or many instance IDs.