Question 600
A Terraform associate evaluates: A reviewer must ensure the imported object ID refers to the correct environment before apply. Select TWO complementary responses: the appropriate action AND direct evidence it worked.
Explanation
Correct Answers
The case says: A reviewer must ensure the imported object ID refers to the correct environment before apply. The directly relevant Terraform response is: Use an import block with a resource address and remote object ID plus matching resource configuration, then review plan to adopt existing infrastructure. This addresses the related failure mode: A declared resource that matches a preexisting object is not automatically tracked unless imported or otherwise bound. Validate the result by checking: The plan shows import for the intended object and subsequent plans recognize it as managed without recreating it. The selection matches this objective, rather than a different Terraform administration task.
The observed situation is: A reviewer must ensure the imported object ID refers to the correct environment before apply. The acceptance evidence is: The plan shows import for the intended object and subsequent plans recognize it as managed without recreating it. It verifies the corrective approach (Use an import block with a resource address and remote object ID plus matching resource configuration, then review plan to adopt existing infrastructure.) and controls the risk: A declared resource that matches a preexisting object is not automatically tracked unless imported or otherwise bound. Checking an unrelated Terraform setting would not prove the stated requirement was met.
Incorrect Answers
Use terraform import ADDRESS ID to bind an existing remote object to an existing resource configuration, then plan to reconcile attributes. This belongs to CLI terraform import behavior (official objective 7a). Its separate risk is that the import command updates state binding and does not automatically write a complete configuration for every resource. The question instead tests Import block declarative adoption; that other safeguard alone does not verify it.
The failed operation produces relevant diagnostic output and normal logging is restored after troubleshooting. That addresses TF_LOG for diagnostic visibility (official objective 7c), specifically the hazard that verbose Terraform logs may include sensitive configuration or provider data and can become excessively large. Here the necessary action or evidence is the paired action Use an import block with a resource address and remote object ID plus matching resource configuration, then review plan to adopt existing infrastructure and separate validation The plan shows import for the intended object and subsequent plans recognize it as managed without recreating it, not that separate control.
Guessing resource bindings from cloud consoles without inspecting state can target the wrong Terraform address. This does not provide the required Import block declarative adoption action-and-evidence pair.