nerdexam
HashiCorpHashiCorp

TERRAFORM-ASSOCIATE-004 · Question #245

TERRAFORM-ASSOCIATE-004 Question #245: Real Exam Question with Answer & Explanation

The correct answer is A: True. True. A module variable declared without a default value is required - it has no fallback. Any root or parent module that calls it must explicitly supply a value for that variable in the module block. If the value is omitted, Terraform will raise an error during the plan phase. O

Submitted by miguelv· Apr 18, 2026Work with Terraform Modules

Question

If a module declares a variable without a default value, you must pass the value of the variable within the module block when you call the module in your configuration.

Options

  • ATrue
  • BFalse

Explanation

True. A module variable declared without a default value is required - it has no fallback. Any root or parent module that calls it must explicitly supply a value for that variable in the module block. If the value is omitted, Terraform will raise an error during the plan phase. Only variables declared with a default value are optional in the calling module block; the default is used automatically when no value is provided.

Topics

#Terraform modules#Module variables#Required variables#Module inputs

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-004 PracticeBrowse All TERRAFORM-ASSOCIATE-004 Questions