Question 290
After corrective work at Parkside Technology Services, a reviewer requests measurable proof for: A CI job should reject code that is not Terraform-formatted without silently modifying a pull-request checkout. Which observation best confirms that the proposed correction worked?
Explanation
Correct Answer
A deliberately misformatted fixture fails the check while a formatted one passes. This directly verifies the corrective action: Run terraform fmt -check in CI and fail when formatting changes would be required. The measured result specifically addresses the failure at Parkside Technology Services: A CI job should reject code that is not Terraform-formatted without silently modifying a pull-request checkout.
Incorrect Answers
The new module and provider dependencies resolve and appear in the planned graph. This evidence would validate a DIFFERENT correction: Reinitialize the working directory after changing provider/module installation requirements before planning. That different correction addresses: A team edits configuration during an infrastructure release but omits initialization after adding a new module dependency. It does not establish that the Parkside Technology Services issue has been corrected: A CI job should reject code that is not Terraform-formatted without silently modifying a pull-request checkout. The relevant measured outcome is: A deliberately misformatted fixture fails the check while a formatted one passes.
A call omitting the optional input plans successfully with the declared default. This evidence would validate a DIFFERENT correction: Use the default for ordinary cases and override the input only for documented exceptional environments. That different correction addresses: A module's input has a default but the consuming team assumes it must always pass an explicit value in every call. It does not establish that the Parkside Technology Services issue has been corrected: A CI job should reject code that is not Terraform-formatted without silently modifying a pull-request checkout. The relevant measured outcome is: A deliberately misformatted fixture fails the check while a formatted one passes.
The refreshed plan contains only a lookup for that zone and no zone creation or replacement. This evidence would validate a DIFFERENT correction: Use an appropriate provider data source to query the published zone without assuming lifecycle ownership. That different correction addresses: A team uses a resource block merely to retrieve information about a published DNS zone and accidentally plans a new zone. It does not establish that the Parkside Technology Services issue has been corrected: A CI job should reject code that is not Terraform-formatted without silently modifying a pull-request checkout. The relevant measured outcome is: A deliberately misformatted fixture fails the check while a formatted one passes.