TERRAFORM-ASSOCIATE-004 · Question #48
How do you specify a module's version when publishing it to the public terraform Module Registry?
The correct answer is D. Tag a release in the associated repo. The public Terraform Module Registry uses Git tags to determine module versions. When you publish a module, the registry reads the semantic version tags (e.g., v1.0.0, v1.2.3) from the associated VCS repository (GitHub, GitLab, etc.) and exposes them as selectable versions. There
Question
Options
- AConfiguration it in the module's Terraform code
- BMention it on the module's configuration page on the Terraform Module Registry
- CThe Terraform Module Registry does not support versioning modules
- DTag a release in the associated repo
How the community answered
(26 responses)- A4% (1)
- C8% (2)
- D88% (23)
Explanation
The public Terraform Module Registry uses Git tags to determine module versions. When you publish a module, the registry reads the semantic version tags (e.g., v1.0.0, v1.2.3) from the associated VCS repository (GitHub, GitLab, etc.) and exposes them as selectable versions. There is no version field in the Terraform module code itself for registry purposes, and there is no configuration page for setting the version manually. The registry fully supports versioning - option C is incorrect.
Topics
Community Discussion
No community discussion yet for this question.