Question 220
The reliability team at Westhaven Application Ops is closing an incident described as follows: A reviewer treats a successful terraform fmt as proof that every resource type and expression is valid. Which controlled check would validate the remediation?
Explanation
Correct Answer
A deliberately misspelled resource argument fails validation despite the file being correctly formatted. This directly verifies the corrective action: Run terraform validate after formatting to check semantic and provider-schema consistency. The measured result specifically addresses the failure at Westhaven Application Ops: A reviewer treats a successful terraform fmt as proof that every resource type and expression is valid.
Incorrect Answers
The applied changes correspond to the same exact plan that was approved. This evidence would validate a DIFFERENT correction: Apply the previously saved reviewed plan rather than silently calculating an unrelated replacement plan. That different correction addresses: A pipeline recreates a new unapproved plan between review and apply, potentially introducing changes not previously seen. It does not establish that the Westhaven Application Ops issue has been corrected: A reviewer treats a successful terraform fmt as proof that every resource type and expression is valid. The relevant measured outcome is: A deliberately misspelled resource argument fails validation despite the file being correctly formatted.
A negative test input is rejected and a valid capacity proceeds to planning. This evidence would validate a DIFFERENT correction: Add an input-variable validation condition enforcing a positive capacity with a clear error message. That different correction addresses: A module accepts a storage capacity variable of -5 and should fail before attempting an API call. It does not establish that the Westhaven Application Ops issue has been corrected: A reviewer treats a successful terraform fmt as proof that every resource type and expression is valid. The relevant measured outcome is: A deliberately misspelled resource argument fails validation despite the file being correctly formatted.
The plan reports the observed difference and the operator records an intentional corrective decision. This evidence would validate a DIFFERENT correction: Refresh state through a normal or refresh-only plan and evaluate the resulting drift before applying any configuration change. That different correction addresses: A resource is manually renamed in the cloud API, but Terraform's recorded state still contains its earlier attributes. It does not establish that the Westhaven Application Ops issue has been corrected: A reviewer treats a successful terraform fmt as proof that every resource type and expression is valid. The relevant measured outcome is: A deliberately misspelled resource argument fails validation despite the file being correctly formatted.