A module block is shown in the Exhibit space of this page. When you use a module block to reference a module from the Terraform Registry such as the one in the example, how do you specify version 1.0.0 of the module?
A.
Append ?ref=v1.0.0 argument to the source path.
B.
You cannot. Modules stored on the public Terraform Registry do not support versioning.
C.
Add a version = "1.0.0" attribute to the module block.
D.
Nothing. Modules stored on the public Terraform module Registry always default to version 1.0.0.
Module Versioning: To specify a version in a module block for modules in theTerraform Registry, you add the version attribute, e.g., version = "1.0.0".
Terraform Registry Support: The public registrysupports versioningby enabling semantic constraints, allowing users to define specific versions compatible with their infrastructure requirements.
Refer to themodule versioning documentationin Terraform’s official registry guide.
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit