Exam Terraform-Associate-004 Topic 1 Question 97 Discussion

Actual exam question for HashiCorp's Terraform-Associate-004 exam
Question #: 97
Topic #: 1
A child module can always access variables declared in its parent module.

Suggested Answer: B Vote an answer

Child modulesdo not automatically inheritvariables from the parent module.
To pass values from theparent moduleto thechild module, you mustexplicitly define input variablesin the child module and pass them in the parent module.
Example:
hcl
CopyEdit
module "example" {
source = "./child_module"
var1 = "value"
}
Official Terraform Documentation Reference:
Passing Variables to Modules

by Hedda at Mar 20, 2026, 03: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