HashiCorpHashiCorp
TA-002-P · Question #40
TA-002-P Question #40: Real Exam Question with Answer & Explanation
The correct answer is A: Modules stored on the public Terraform Module Registry do not support versioning. The question, with its provided correct answer, states that modules on the public Terraform Module Registry do not support versioning.
Interact with Terraform modules
Question
When using a module block to reference a module stored on the public Terraform Module Registry such as: How do you specify version 1.0.0?
Options
- AModules stored on the public Terraform Module Registry do not support versioning
- BAppend ?ref=v1.0.0 argument to the source path
- CAdd version = "1.0.0" attribute to module block
- DNothing ?modules stored on the public Terraform Module Registry always default to
Explanation
The question, with its provided correct answer, states that modules on the public Terraform Module Registry do not support versioning.
Common mistakes.
- B. Appending
?ref=v1.0.0is a syntax used for Git module sources or other specific source types, not for specifying versions of modules consumed directly from the public Terraform Module Registry. - C. Adding
version = '1.0.0'attribute to the module block is the standard and correct method for specifying a version for a public Terraform Module Registry module; therefore, it is incorrect if option A's premise is taken as true. - D. Modules on the public Terraform Module Registry do not always default to a specific version without explicit specification or relying on the latest published version, and they do support versioning in general.
Concept tested. Terraform module versioning and registry behavior
Topics
#Terraform Modules#Module Registry#Module Versioning#Module Source
Community Discussion
No community discussion yet for this question.