Question 670
A Terraform associate evaluates: A team must distinguish CLI-driven, VCS-driven and API-driven infrastructure workflows. Select TWO complementary responses: the appropriate action AND direct evidence it worked.
Explanation
Correct Answers
The observed situation is: A team must distinguish CLI-driven, VCS-driven and API-driven infrastructure workflows. The acceptance evidence is: An approved CLI-driven run executes under the targeted HCP workspace and its state and run history are available centrally. It verifies the corrective approach (Use an HCP Terraform workspace with a supported cloud configuration or remote workflow for CLI-driven plans and applies, keeping state under the hosted workspace.) and controls the risk: A local terraform command connected to HCP Terraform can trigger remote operations and need not imply the state is stored in the local directory. Checking an unrelated Terraform setting would not prove the stated requirement was met.
The case says: A team must distinguish CLI-driven, VCS-driven and API-driven infrastructure workflows. The directly relevant Terraform response is: Use an HCP Terraform workspace with a supported cloud configuration or remote workflow for CLI-driven plans and applies, keeping state under the hosted workspace. This addresses the related failure mode: A local terraform command connected to HCP Terraform can trigger remote operations and need not imply the state is stored in the local directory. Validate the result by checking: An approved CLI-driven run executes under the targeted HCP workspace and its state and run history are available centrally. The selection matches this objective, rather than a different Terraform administration task.
Incorrect Answers
Without enforcement gates a valid Terraform plan can still violate security or cost policy. This is relevant to HCP Terraform policy and governance controls (official objective 8b). Its distinct failure risk is that without enforcement gates a valid Terraform plan can still violate security or cost policy. The present question tests CLI-driven HCP Terraform remote operations, which this measure alone does not establish.
Connect an HCP Terraform workspace to an authorized VCS repository so approved commits and pull requests can drive remote plans and runs. This addresses HCP Terraform VCS-driven runs (official objective 8a). The separate hazard is that a workspace without the intended VCS connection will not automatically track repository changes. It does not by itself satisfy the case-specific requirement for CLI-driven HCP Terraform remote operations.
The CLI targets the correct hosted workspace and remote runs obtain approved short-lived credentials without static secrets in code. This does not provide the required CLI-driven HCP Terraform remote operations action-and-evidence pair.