HashiCorp Terraform 003 Module Sources Guide

Study HashiCorp Terraform 003 Module Sources: key concepts, common traps, and exam decision cues.

This lesson matters because module questions are usually interface questions in disguise. You need to know where the module comes from, what inputs it expects, and what outputs it exposes.

Module chooser

If the question is mostly about… Strongest first fit
where reusable code is loaded from module source
what values a module needs input variables
what values a module exposes outputs

Decision order that usually wins

  1. Ask whether the question is about source, inputs, or outputs.
  2. Treat module calls as interface contracts, not copy-paste blobs.
  3. Inspect required inputs before assuming the module is misbehaving.
  4. Inspect outputs when the module’s exposed values are under test.
  5. Keep modules separate from workspaces and backends in your mental model.

Common traps

Trap Better rule
treating a module like a workspace modules are reuse units, workspaces are state instances
ignoring the module interface inputs and outputs define the contract
using modules as raw copy-paste containers the value is structured reuse

Quiz

Loading quiz…
Revised on Sunday, May 10, 2026