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

5.4. Reflection Checkpoint

Key Takeaways

  • A module is a directory of configuration; your root config is already one. The source argument picks the protocol — local (./), registry, Git, HTTP, or cloud storage.
  • Registry modules use the namespace/name/provider address and support the version argument; Git sources pin with ?ref= instead.
  • Modules are functions: data flows in through arguments to the child's variables and out through the child's declared outputs only — you can't reach a child's internal resources.
  • Composition wires one module's output into another's input, creating implicit ordering; version constraints trade stability against staying current, and exact pins suit production.

Connecting Forward

Phase 6 returns to the other foundational input from Phase 1 — state — and gets operational about it: where state is stored (backends), how concurrent access is made safe (locking), how Terraform detects when reality has drifted, and the new 004 way to refactor state addresses safely with moved and removed blocks.

Self-Check Questions

  • List four valid module sources and give the addressing detail that distinguishes each.
  • Explain, using the function analogy, why a child module can't read its parent's variables and a parent can't read the child's internal resources.
  • Your registry module is constrained with ~> 4.2. Which versions can init -upgrade install, and how would you tighten it to patch-only?
Alvin Varughese
Written byAlvin Varughese
Founder18 professional certifications