Question 610
A Terraform associate evaluates: A team must decide between CLI import and a declarative import block for onboarding. Select TWO complementary responses: the appropriate action AND direct evidence it worked.
Explanation
Correct Answers
The observed situation is: A team must decide between CLI import and a declarative import block for onboarding. The acceptance evidence is: The imported resource appears in state and a plan identifies any remaining configuration differences. It verifies the corrective approach (Use terraform import ADDRESS ID to bind an existing remote object to an existing resource configuration, then plan to reconcile attributes.) and controls the risk: The import command updates state binding and does not automatically write a complete configuration for every resource. Checking an unrelated Terraform setting would not prove the stated requirement was met.
The case says: A team must decide between CLI import and a declarative import block for onboarding. The directly relevant Terraform response is: Use terraform import ADDRESS ID to bind an existing remote object to an existing resource configuration, then plan to reconcile attributes. This addresses the related failure mode: The import command updates state binding and does not automatically write a complete configuration for every resource. Validate the result by checking: The imported resource appears in state and a plan identifies any remaining configuration differences. The selection matches this objective, rather than a different Terraform administration task.
Incorrect Answers
Use an import block with a resource address and remote object ID plus matching resource configuration, then review plan to adopt existing infrastructure. This is relevant to Import block declarative adoption (official objective 7a). Its distinct failure risk is that a declared resource that matches a preexisting object is not automatically tracked unless imported or otherwise bound. The present question tests CLI terraform import behavior, which this measure alone does not establish.
Removing a binding when intending only a resource rename can cause Terraform to plan duplicate resources. That is the exact risk associated with State mv versus state rm and moved blocks (official objective 7b), not the required CLI terraform import behavior outcome.
The failed operation produces relevant diagnostic output and normal logging is restored after troubleshooting. This addresses TF_LOG for diagnostic visibility (official objective 7c). The separate hazard is that verbose Terraform logs may include sensitive configuration or provider data and can become excessively large. It does not by itself satisfy the case-specific requirement for CLI terraform import behavior.