Exam Terraform-Associate-004 Topic 2 Question 26 Discussion

Actual exam question for HashiCorp's Terraform-Associate-004 exam
Question #: 26
Topic #: 2
Parent modules can always access a child module's variable values.

Suggested Answer: B Vote an answer

The correct answer is B because Terraform modules have clear input and output boundaries. A child module's input variables are scoped to that child module and are not automatically exposed back to the parent module.
The parent module can pass values into a child module by setting arguments in the module block, but it cannot directly access the child module's variable namespace. Terraform does not support references such as module.child.var.example. When a child module needs to share information with its caller, the child module must define output values. The parent module can then reference those outputs using syntax such as module.
child.output_name. This module interface keeps configurations reusable, predictable, and encapsulated, which is a core Terraform module design principle.

by Hayden at Oct 05, 2026, 11:50 PM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

0
0
0
10