Question 620
A Terraform associate evaluates: An operator checks whether an imported resource was successfully bound to a Terraform address. Select TWO complementary responses: the appropriate action AND direct evidence it worked.
Explanation
Correct Answers
The case says: An operator checks whether an imported resource was successfully bound to a Terraform address. The directly relevant Terraform response is: Use terraform state list to enumerate tracked addresses and terraform state show ADDRESS to inspect a specific object safely. This addresses the related failure mode: Guessing resource bindings from cloud consoles without inspecting state can target the wrong Terraform address. Validate the result by checking: The listed address matches the intended resource and show presents its recorded attributes for review. The selection matches this objective, rather than a different Terraform administration task.
The observed situation is: An operator checks whether an imported resource was successfully bound to a Terraform address. The acceptance evidence is: The listed address matches the intended resource and show presents its recorded attributes for review. It verifies the corrective approach (Use terraform state list to enumerate tracked addresses and terraform state show ADDRESS to inspect a specific object safely.) and controls the risk: Guessing resource bindings from cloud consoles without inspecting state can target the wrong Terraform address. Checking an unrelated Terraform setting would not prove the stated requirement was met.
Incorrect Answers
Use moved blocks or state mv for renames that preserve management, and state rm only when deliberately ceasing to manage an object without destroying it. This belongs to State mv versus state rm and moved blocks (official objective 7b). Its separate risk is that removing a binding when intending only a resource rename can cause Terraform to plan duplicate resources. The question instead tests Inspect state list and show; that other safeguard alone does not verify it.
The imported resource appears in state and a plan identifies any remaining configuration differences. This is relevant to CLI terraform import behavior (official objective 7a). Its distinct failure risk is that the import command updates state binding and does not automatically write a complete configuration for every resource. The present question tests Inspect state list and show, which this measure alone does not establish.
A declared resource that matches a preexisting object is not automatically tracked unless imported or otherwise bound. This addresses Import block declarative adoption (official objective 7a). The separate hazard is that a declared resource that matches a preexisting object is not automatically tracked unless imported or otherwise bound. It does not by itself satisfy the case-specific requirement for Inspect state list and show.