HashiCorp
TERRAFORM-ASSOCIATE-004 · Question #189
When you include a module block in your configuration that references a module from the Terraform Registry, the "version" attribute is required.
The correct answer is B. False. The "version" attribute is optional when referencing a module from the Terraform Registry. If not specified, the latest version will be used, but it is often recommended to specify a version to ensure consistency across environments.
Submitted by skyler.x· Apr 18, 2026Work with Terraform Modules
Question
When you include a module block in your configuration that references a module from the Terraform Registry, the "version" attribute is required.
Options
- ATrue
- BFalse
How the community answered
(32 responses)- A13% (4)
- B88% (28)
Explanation
The "version" attribute is optional when referencing a module from the Terraform Registry. If not specified, the latest version will be used, but it is often recommended to specify a version to ensure consistency across environments.
Topics
#Terraform Modules#Module Block#Module Versioning#Terraform Registry
Community Discussion
No community discussion yet for this question.