HashiCorp Certified: Terraform Associate — Question 199
How do you specify a module's version when publishing it to the public Terraform Module Registry?
Answer options
- A. Configure it in the module's Terraform code
- B. Mention it on the module s configuration page on the Terraform Module Registry
- C. The Terraform Module Registry does not support versioning modules
- D. Tag a release in the associated repo
Correct answer: D
Explanation
The correct answer is D because tagging a release in the associated repository allows the Terraform Module Registry to recognize and use that specific version of the module. Option A is incorrect as versioning is not defined solely within the module’s code. Option B is also wrong because the version is not set on the configuration page, and Option C is false since the Registry does support module versioning.