HashiCorp
TERRAFORM-ASSOCIATE-003 · 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
Interact 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
(38 responses)- A18% (7)
- B82% (31)
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
#module variables#default values#variable declaration
Community Discussion
No community discussion yet for this question.