nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-003 · Question #194

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…

The correct answer is C. Add a version = "1.0.0" attribute to the module block. Module Versioning: To specify a version in a module block for modules in the Terraform Registry, you add the version attribute, e.g., version = "1.0.0". Terraform Registry Support: The public registry supports versioning by enabling semantic constraints, allowing users to…

Interact with Terraform Modules

Question

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?

Options

  • AAppend ?ref=v1.0.0 argument to the source path.
  • BYou cannot. Modules stored on the public Terraform Registry do not support versioning.
  • CAdd a version = "1.0.0" attribute to the module block.
  • DNothing. Modules stored on the public Terraform module Registry always default to version

How the community answered

(28 responses)
  • A
    14% (4)
  • B
    4% (1)
  • C
    75% (21)
  • D
    7% (2)

Explanation

Module Versioning: To specify a version in a module block for modules in the Terraform Registry, you add the version attribute, e.g., version = "1.0.0". Terraform Registry Support: The public registry supports versioning by enabling semantic constraints, allowing users to define specific versions compatible with their infrastructure

Topics

#module versioning#Terraform Registry#version attribute#module block

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-003 Practice