Study HashiCorp Terraform 004 Import and State Inspection: key concepts, common traps, and exam decision cues.
Import is one of the clearest maintenance topics on the exam because it tests whether you understand Terraform management separately from resource creation. State inspection then tests whether you can look at Terraform’s current record instead of guessing.
| Import does… | Import does not… |
|---|---|
| bring an existing object under Terraform management | mean Terraform originally created that object |
| associate a real object with a Terraform address in state | replace the need for matching configuration |
| support safer adoption of existing infrastructure | blindly solve drift or every state issue |
| Need | Strongest first move |
|---|---|
| understand what Terraform currently tracks | inspect state |
| verify how an imported object is represented | inspect state after import |
| troubleshoot management understanding | use the state CLI intentionally |
| Trap | Better rule |
|---|---|
| saying import creates infrastructure | import is about adoption into management |
| importing without matching configuration intent | Terraform still needs configuration that represents the object properly |
| guessing about state contents | inspect state instead of assuming |
Import questions usually test whether you understand that import affects state, not configuration quality by itself. First, import the existing object into Terraform management. Then make sure the configuration actually represents what should be managed. When inspecting what Terraform knows, use the terraform state tool family. The exam often punishes answers that treat import as full automatic modeling.