nerdexam
HashiCorp

TA-002-P · Question #436

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

The correct answer is C. The release tags in the associated repo. When publishing to the Public Terraform Module Registry, module versions are automatically determined by the Git release tags (e.g., v1.0.0) found in the associated source code repository.

Interact with Terraform modules

Question

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

Options

  • AThe module's configuration page on the Terraform Module Registry
  • BTerraform Module Registry does not support versioning modules
  • CThe release tags in the associated repo
  • DThe module's Terraform code

How the community answered

(32 responses)
  • A
    6% (2)
  • B
    3% (1)
  • C
    88% (28)
  • D
    3% (1)

Why each option

When publishing to the Public Terraform Module Registry, module versions are automatically determined by the Git release tags (e.g., `v1.0.0`) found in the associated source code repository.

AThe module's configuration page on the Terraform Module Registry

While there might be a configuration page for a module, the version itself is not manually specified there; it is derived directly from the Git repository's tags.

BTerraform Module Registry does not support versioning modules

Terraform Module Registry absolutely supports versioning modules; it is a fundamental feature that allows users to specify and rely on particular module versions.

CThe release tags in the associated repoCorrect

The Public Terraform Module Registry automatically detects and lists module versions based on Git release tags (e.g., `v1.0.0`, `v1.0.1`) found in the module's linked source code repository.

DThe module's Terraform code

The module's Terraform code itself does not contain metadata for its overall version number as published to the registry; versioning is managed at the repository level via Git tags.

Concept tested: Terraform Module Registry versioning

Source: https://developer.hashicorp.com/terraform/registry/modules/publish#module-versions

Topics

#Terraform Modules#Module Registry#Module Versioning#Git Tags

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice