TERRAFORM-ASSOCIATE-004 · Question #151
Which of the following is not a valid source path for specifying a module?
The correct answer is B. source = "./module?version=vl.6.0". Terraform modules are referenced by specifying a source location. This location can be a URL or a file path. However, specifying query parameters such as ?version=vl.6.0 directly within the source path is not a valid or supported method for specifying a module version in Terrafor
Question
Options
- Asource - "github.com/hashicorp/examplePref-ul.0.8M
- Bsource = "./module?version=vl.6.0"
- Csource - "hashicorp/consul/aws"
- Dsource - "./module"
How the community answered
(37 responses)- A3% (1)
- B89% (33)
- C3% (1)
- D5% (2)
Explanation
Terraform modules are referenced by specifying a source location. This location can be a URL or a file path. However, specifying query parameters such as ?version=vl.6.0 directly within the source path is not a valid or supported method for specifying a module version in Terraform. Instead, version constraints are specified using the version argument within the module block, not as part of the source string.
Topics
Community Discussion
No community discussion yet for this question.