Question 150
A Terraform associate evaluates: A project wants retention and encryption controls for its backend's state snapshots. Select TWO complementary responses: the appropriate action AND direct evidence it worked.
Explanation
Correct Answers
The observed situation is: A project wants retention and encryption controls for its backend's state snapshots. The acceptance evidence is: An authorized operator can access protected state while unrelated users cannot and sample state is reviewed for exposed secrets. It verifies the corrective approach (Protect state storage with encryption, narrow access and careful retention because resource attributes and secrets can appear in state.) and controls the risk: Marking a variable sensitive does not automatically remove its secret value from state snapshots. Checking an unrelated Terraform setting would not prove the stated requirement was met.
The case says: A project wants retention and encryption controls for its backend's state snapshots. The directly relevant Terraform response is: Protect state storage with encryption, narrow access and careful retention because resource attributes and secrets can appear in state. This addresses the related failure mode: Marking a variable sensitive does not automatically remove its secret value from state snapshots. Validate the result by checking: An authorized operator can access protected state while unrelated users cannot and sample state is reviewed for exposed secrets. The selection matches this objective, rather than a different Terraform administration task.
Incorrect Answers
Use Terraform state as the mapping between configuration addresses and managed remote object identifiers, rather than treating state as the desired configuration itself. This belongs to State resource bindings (official objective 2d). Its separate risk is that deleting or editing state without understanding bindings can orphan real resources or produce unwanted create plans. The question instead tests State sensitivity and access control; that other safeguard alone does not verify it.
A clean init uses the committed selected provider version and verifies recorded package checksums. This is relevant to Provider dependency lock file (official objective 2a). Its distinct failure risk is that ignoring the provider lock file can unexpectedly select different compatible releases on different workstations. The present question tests State sensitivity and access control, which this measure alone does not establish.
Assuming child modules automatically see every aliased provider may result in wrong bindings or validation failures. That is the exact risk associated with Pass provider aliases to child modules (official objective 2c), not the required State sensitivity and access control outcome.