Exam4Training

How do you specify version 1.0.0?

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?
A . Modules stored on the public Terraform Module Registry do not support versioning
B. Append ?ref=v1.0.0 argument to the source path
C. Add version = "1.0.0" attribute to module block
D. Nothing C modules stored on the public Terraform Module Registry always default to version 1.0.0

Answer: C

Explanation:

Version

When using modules installed from a module registry, we recommend explicitly constraining the acceptable version numbers to avoid unexpected or unwanted changes.

Use the version argument in the module block to specify versions:

module "consul" {

source = "hashicorp/consul/aws"

version = "0.0.5"

servers = 3

}

Reference: https://www.terraform.io/docs/language/modules/sources.html

Latest TA-002-P Dumps Valid Version with 324 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Exit mobile version