HashiCorp
TERRAFORM-ASSOCIATE-004 · Question #129
If a module declares a variable with a default, that variable must also be defined within the module.
The correct answer is B. False. A module can declare a variable with a default value without requiring the caller to define it. This allows the module to provide a sensible default behavior that can be customized by the caller if
Submitted by krish.m· Apr 18, 2026Work with Terraform Modules
Question
If a module declares a variable with a default, that variable must also be defined within the module.
Options
- ATrue
- BFalse
How the community answered
(29 responses)- A14% (4)
- B86% (25)
Explanation
A module can declare a variable with a default value without requiring the caller to define it. This allows the module to provide a sensible default behavior that can be customized by the caller if
Topics
#Terraform variables#Module inputs#Variable defaults#Module structure
Community Discussion
No community discussion yet for this question.