How do you specify a module's version when publishing it to the public Terraform Module Registry?

Prepare for the HashiCorp Terraform Associate Exam with quizzes, flashcards, and multiple-choice questions. Each question includes hints and explanations. Boost your confidence and ace your exam!

Multiple Choice

How do you specify a module's version when publishing it to the public Terraform Module Registry?

Explanation:
Module versioning in the public Terraform Module Registry is driven by release tags in the module’s source repository. When you publish a new version, you create a semantic version tag in your Git repository (for example, v1.2.0) and push it. The registry detects that tag and exposes it as a distinct version that users can pin in their configurations. The version isn’t defined inside the Terraform code or set on the registry page; it comes from the repository’s tagged releases. You can then reference specific versions or version ranges in your configurations to control which module version is used.

Module versioning in the public Terraform Module Registry is driven by release tags in the module’s source repository. When you publish a new version, you create a semantic version tag in your Git repository (for example, v1.2.0) and push it. The registry detects that tag and exposes it as a distinct version that users can pin in their configurations. The version isn’t defined inside the Terraform code or set on the registry page; it comes from the repository’s tagged releases. You can then reference specific versions or version ranges in your configurations to control which module version is used.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy