Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Terraform Associate All Questions

View all questions & answers for the Terraform Associate exam

Exam Terraform Associate topic 1 question 165 discussion

Actual exam question from HashiCorp's Terraform Associate
Question #: 165
Topic #: 1
[All Terraform Associate Questions]

Which is the best way to specify a tag of v1.0.0 when referencing a module stored in Git (for example git::https://example.com/vpc.git)?

  • A. Append ?ref=v1. 0. 0 argument to the source path
  • B. Add version = "1.0.0" parameter to module block
  • C. Nothing ג€" modules stored on GitHub always default to version 1.0.0
  • D. Modules stored on GitHub do not support versioning
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
RVivek
Highly Voted 2 years, 1 month ago
Selected Answer: A
If the source is from terrform registry then we can use version = "1.0.0" when using git as the source we have to use ?ref=1.0.0 the exact git path givin in the question is given in this terraform official documentation please check https://www.terraform.io/language/modules/sources#selecting-a-revision
upvoted 8 times
...
BaburTurk
Highly Voted 1 year, 11 months ago
Selected Answer: A
example source = "git::https://example.com/vpc.git?ref=v1.2.0"
upvoted 6 times
...
dinesh198728
Most Recent 2 years, 2 months ago
Selected Answer: A
A is correct
upvoted 3 times
...
zyxphreez
2 years, 2 months ago
Selected Answer: A
as Donathon said.... https://www.terraform.io/language/modules/sources#selecting-a-revision please check the module repository is GIT.... Burakko answer is incorrect
upvoted 2 times
Burakko
2 years, 2 months ago
There was exactly the same question earlier. This was the answer. however if you I ask me, both answers must be correct. Because they both work.
upvoted 1 times
...
...
donathon
2 years, 2 months ago
Selected Answer: A
https://www.terraform.io/language/modules/sources#selecting-a-revision
upvoted 3 times
...
Burakko
2 years, 2 months ago
Selected Answer: B
Use the version argument in the module block to specify versions: Example: module "consul" { source = "hashicorp/consul/aws" version = "0.0.5" servers = 3 }
upvoted 3 times
Linus11
2 years, 1 month ago
This is about version stored in GIT, not in consul.
upvoted 2 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...