Notifications
Clear all
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
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
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