Study HashiCorp Terraform 003 Variables and Outputs: key concepts, common traps, and exam decision cues.
This lesson matters because reusable Terraform configuration depends on clean inputs and clear outputs. Variables shape behavior coming in, outputs expose values going out, and sensitive handling protects what should not be echoed carelessly.
| If the question is mostly about… | Strongest first fit |
|---|---|
| value coming into configuration | variable |
| value exposed after evaluation | output |
| reducing accidental display of sensitive data | sensitive handling |
| Trap | Better rule |
|---|---|
| treating outputs like variable defaults | outputs expose results, not inputs |
| ignoring sensitivity because the variable works | secrecy and correctness are different concerns |
| collapsing locals, variables, and outputs together | each serves a different role |