Question 210
At Granitepoint Education Services, an authorized infrastructure engineering team manages a Terraform 1.12 and HCP Terraform environment. The team encounters the following situation: a team deletes every .tf file but expects its state JSON to fully describe the intended future infrastructure. Choose the technically best Terraform Associate 004 practice response to this particular infrastructure case. What mechanism explains why the original approach fails?
Explanation
Correct Answer
State records tracked object metadata but does not substitute for desired configuration. That mechanism distinguishes state is not source configuration in the Granitepoint Education Services case. The corresponding appropriate correction is: Restore the reviewed Terraform configuration alongside valid state. The measurable acceptance test is: A plan evaluates restored configuration against the state without intending mass destruction.
Incorrect Answers
The offered principle describes: Sensitive marking suppresses display but ordinary sensitive resource attributes may still be stored in state. The situation in this question instead depends on: State records tracked object metadata but does not substitute for desired configuration. These are different technical conditions.
This alternative is valid when the dependency lock file preserves previously selected versions until an upgrade is explicitly requested. The facts here establish a different controlling reason: State records tracked object metadata but does not substitute for desired configuration.
The offered principle describes: Terraform fmt rewrites supported HCL files into its canonical style. The situation in this question instead depends on: State records tracked object metadata but does not substitute for desired configuration. These are different technical conditions.