HashiCorp
TERRAFORM-ASSOCIATE-004 · Question #222
When you initialize Terraform, where does it cache modules from the public Terraform Registry?
The correct answer is B. In the .terraform sub-directory. Terraform downloads modules and providers into the .terraform directory inside the working A (/tmp/) - Incorrect; modules are not stored temporarily. C (In memory) - Incorrect; modules persist on disk. D (Not cached) - Incorrect; Terraform does cache modules for efficiency.
Submitted by satoshi_tk· Apr 18, 2026Use Terraform CLI
Question
When you initialize Terraform, where does it cache modules from the public Terraform Registry?
Options
- AIn the /tmp directory.
- BIn the .terraform sub-directory.
- CIn memory.
- DThey are not cached.
How the community answered
(49 responses)- A4% (2)
- B94% (46)
- D2% (1)
Explanation
Terraform downloads modules and providers into the .terraform directory inside the working A (/tmp/) - Incorrect; modules are not stored temporarily. C (In memory) - Incorrect; modules persist on disk. D (Not cached) - Incorrect; Terraform does cache modules for efficiency.
Topics
#terraform init#module caching#.terraform directory#public registry
Community Discussion
No community discussion yet for this question.