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 154 discussion

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

Which of the following statements about local modules is incorrect?

  • A. Local modules are not cached by terraform init command
  • B. Local modules are sourced from a directory on disk
  • C. Local modules support versions
  • D. All of the above (all statements above are incorrect)
  • E. None of the above (all statements above are correct)
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
rotimislaw
Highly Voted 1 year, 9 months ago
Why not A? Are local modules cached or not?
upvoted 7 times
...
LemonadeSoftware
Highly Voted 1 year ago
The correct answer is C. "Local modules support versions" is incorrect. A. This statement is incorrect. Local modules are cached by the terraform init command. When you run terraform init, Terraform downloads and installs the modules specified in the configuration, including local modules, and caches them in the .terraform directory. B. This statement is correct. Local modules are sourced from a directory on disk. You can specify the path to the directory containing your local module in your Terraform configuration. C. This statement is incorrect. Local modules do not support versions in the same way remote modules hosted on version control systems (e.g., Git) do. Local modules are typically referenced by a relative or absolute path, and there is no versioning mechanism built into Terraform for local modules. D. This cannot be the correct answer because Statement B is correct. E. This cannot be the correct answer because Statement C is incorrect. So, the correct answer is C.
upvoted 6 times
RealPro111
2 months, 1 week ago
So it should be A and C together? The information you give is correct but the question asks for incorrect options, and both A and C are wrong so these should be the answer
upvoted 1 times
...
...
camps
Most Recent 1 year, 7 months ago
Selected Answer: C
C. Local modules support versions. Local modules are sourced from a directory on disk and are typically used to organize and reuse Terraform code within a project. However, local modules do not support versions. This means that if you make changes to a local module, those changes will be reflected in all resources that use that module, regardless of when those resources were created.
upvoted 1 times
...
dinesh198728
2 years, 2 months ago
Selected Answer: C
Version constraints are supported only for modules installed from a module registry, such as the public Terraform Registry or Terraform Cloud's private module registry. Other module sources can provide their own versioning mechanisms within the source string itself, or might not support versions at all. In particular, modules sourced from local file paths do not support version; since they're loaded from the same source repository, they always share the same version as their caller.
upvoted 3 times
...
depal_dhir
2 years, 2 months ago
Selected Answer: C
https://www.terraform.io/language/modules/syntax
upvoted 2 times
...
Hizumi
2 years, 2 months ago
Answer is C. In particular, modules sourced from local file paths do not support version; since they're loaded from the same source repository, they always share the same version as their caller. Reference: https://www.terraform.io/language/modules/syntax
upvoted 4 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 ...