Infrastructure as Code

Variables, Local Values, and Outputs

Use input variables, type constraints, local values, outputs, and sensitive-value boundaries to create clear and reusable OpenTofu module interfaces.

Intermediate14 min read
Infrastructure as Code lessonDelivery and reliability foundationsPractice

UNTIMED COACHING

Practice before the pressure

Use feedback to correct the model, not merely memorize an option position.

GUIDED PRACTICE

Practice the lesson questions

Answer normal lesson questions without a timer. Every answer includes an explanation, and incorrect answers can be tried again before continuing.

CONCEPT MODELS

See the lesson as a system

Use these visual guides to connect the key ideas before answering the questions.

Connect the roles in Variables, Local Values, and OutputsKeep input variable, type constraint, local value, and output value as separate service roles.
Connect the roles in Variables, Local Values, and OutputsA topic-specific model connects four distinct roles used to reason about variables, local values, and outputs.
Input dataData customizes one module invocation
Input decisionDecision rejects incompatible variable values
Derived dataData names a repeated configuration expression
Published resultResult exposes an intentional module value
Verify Sensitive valueConnect sensitive value with its topic-specific inspection, expected outcome, and protected delivery boundary.
Verify Sensitive valueA verification model for variables, local values, and outputs connects the final service decision to its check, result, and protected boundary.
Credential securitySecurity suppresses confidential display output
Starting checkInspect credential security
Expected resultConfirm credential security
Safety boundaryProtect input data scope