How do you specify ...
 
Notifications
Clear all

How do you specify version 1.0.0?

1 Posts
1 Users
0 Likes
216 Views
(@mcgruenathaniel)
Posts: 732
Noble Member
Topic starter
 

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

Show Answer Hide Answer

Suggested 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
 
Posted : 23/10/2022 11:31 am

Latest TA-002-P V1 Dumps Valid Version

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