Question 570
A Terraform associate evaluates: A deployment uses environment-based backend credentials instead of embedding secrets in state configuration. Select TWO complementary responses: the appropriate action AND direct evidence it worked.
Explanation
Correct Answers
The case says: A deployment uses environment-based backend credentials instead of embedding secrets in state configuration. The directly relevant Terraform response is: Supply backend authentication by approved environment or credential mechanisms and do not combine a cloud block and a backend block in one root configuration. This addresses the related failure mode: Hardcoded backend access tokens can persist in .terraform metadata and saved plans, and cloud and backend blocks conflict. Validate the result by checking: The initialized configuration uses one supported backend mechanism and no credentials appear in tracked configuration. The selection matches this objective, rather than a different Terraform administration task.
The observed situation is: A deployment uses environment-based backend credentials instead of embedding secrets in state configuration. The acceptance evidence is: The initialized configuration uses one supported backend mechanism and no credentials appear in tracked configuration. It verifies the corrective approach (Supply backend authentication by approved environment or credential mechanisms and do not combine a cloud block and a backend block in one root configuration.) and controls the risk: Hardcoded backend access tokens can persist in .terraform metadata and saved plans, and cloud and backend blocks conflict. Checking an unrelated Terraform setting would not prove the stated requirement was met.
Incorrect Answers
Confusing refresh-only with a normal corrective plan can leave configuration drift unresolved or record unintended state updates. That is the exact risk associated with Refresh-only planning and state synchronization (official objective 6d), not the required Backend credentials and HCP cloud block exclusivity outcome.
A second state-changing run waits or fails on the lock instead of proceeding concurrently. This addresses Automatic state locking for conflicting writers (official objective 6b). The separate hazard is that two simultaneous applies against one unlocked state can overwrite each other's resource bindings or corrupt management. It does not by itself satisfy the case-specific requirement for Backend credentials and HCP cloud block exclusivity.
Define the supported remote backend within a terraform block, reinitialize, and migrate or reconfigure state deliberately with a backup. This does not provide the required Backend credentials and HCP cloud block exclusivity action-and-evidence pair.