Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

7.3. Reflection Checkpoint

Key Takeaways

  • terraform import (classic) brings a resource into state only, one at a time, and never writes config; import blocks (1.5+) are declarative, plannable, support bulk import, and can generate config via -generate-config-out.
  • terraform state subcommands (list, show, mv, rm) operate on the record onlystate rm stops management without destroying; state mv renames an address.
  • Verbose logging is enabled with the TF_LOG environment variable (TRACE…ERROR, TRACE most verbose) and optionally written to a file with TF_LOG_PATH — there's no --verbose flag.

Connecting Forward

The final content phase, Phase 8, scales everything up to a team platform: HCP Terraform. You'll see how it runs the same workflow remotely, stores state and enforces locking for you, adds governance through policy-as-code (Sentinel and OPA), and organizes work with workspaces, projects, variable sets, and run triggers.

Self-Check Questions

  • Compare classic terraform import with import blocks across three dimensions: what gets created, how many at once, and config generation.
  • A teammate ran terraform state rm on a database, then panicked. Reassure them with an accurate description of what actually happened to the database.
  • Set up verbose logging that captures the most detail to a file. Which two environment variables do you use, and what value gives maximum verbosity?
Alvin Varughese
Written byAlvin Varughese
Founder18 professional certifications