Question 470
A Terraform associate evaluates: A design review asks why a parent module needs explicit input assignments for child variables. Select TWO complementary responses: the appropriate action AND direct evidence it worked.
Explanation
Correct Answers
The case says: A design review asks why a parent module needs explicit input assignments for child variables. The directly relevant Terraform response is: Declare child module inputs inside the child and pass values through module block arguments from the parent; do not assume root variables magically populate children. This addresses the related failure mode: A child module that references an undeclared input variable cannot access a similarly named root variable automatically. Validate the result by checking: A child receives the exact values supplied at its module call and its variable declarations validate them. The selection matches this objective, rather than a different Terraform administration task.
The observed situation is: A design review asks why a parent module needs explicit input assignments for child variables. The acceptance evidence is: A child receives the exact values supplied at its module call and its variable declarations validate them. It verifies the corrective approach (Declare child module inputs inside the child and pass values through module block arguments from the parent; do not assume root variables magically populate children.) and controls the risk: A child module that references an undeclared input variable cannot access a similarly named root variable automatically. Checking an unrelated Terraform setting would not prove the stated requirement was met.
Incorrect Answers
The downloaded module resolves to the approved source and revision recorded in code and dependency inventory. This belongs to Remote module sources and pinning (official objective 5a). Its separate risk is that consuming a mutable remote branch without an intended ref can change module behavior unexpectedly. The question instead tests Child module input variable scope; that other safeguard alone does not verify it.
Expose child module outputs explicitly, and access them through module.NAME.OUTPUT rather than private internal symbols. This is relevant to Parent scope and module output boundaries (official objective 5b). Its distinct failure risk is that directly referencing a child's local or resource name from the parent violates module encapsulation and may fail validation. The present question tests Child module input variable scope, which this measure alone does not establish.
Without version control, an external registry module may change behavior across environments as newer releases appear. That is the exact risk associated with Registry module version selection (official objective 5d), not the required Child module input variable scope outcome.