HashiCorp Terraform 004 Import and State Inspection Guide

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.

Start with what import changes

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

Why state inspection matters

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

Common traps

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

What strong answers usually do

  • define import as adoption into management
  • connect import to state, not to creation history
  • use state inspection when Terraform’s current understanding is the real question

Decision order that usually wins

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.

Quiz

Loading quiz…
Revised on Sunday, May 10, 2026