HashiCorp Certified: Terraform Associate — Question 69
When you initialize Terraform, where does it cache modules from the public Terraform Module Registry?
Answer options
- A. On disk in the /tmp directory
- B. In memory
- C. On disk in the .terraform sub-directory
- D. They are not cached
Correct answer: C
Explanation
The correct answer is C, as Terraform caches modules in the .terraform sub-directory on disk during initialization for future use. Option A is incorrect because the /tmp directory is not used for this purpose, option B is wrong because caching occurs on disk, not in memory, and option D is false since modules are indeed cached.