When you initialize Terraform, where does it cache modules from the public Terraform Module Registry?

Prepare for the HashiCorp Terraform Associate Exam. Utilize flashcards and multiple-choice questions with detailed hints and explanations. Boost your confidence and be ready for success!

Multiple Choice

When you initialize Terraform, where does it cache modules from the public Terraform Module Registry?

Explanation:
When you run terraform init, Terraform downloads public registry modules to your local workspace and stores them on disk in a hidden .terraform directory inside your project. Specifically, the modules end up under .terraform/modules so Terraform can reuse them on subsequent runs without re-downloading. This cached copy is tied to the project directory, and if you delete the .terraform folder, Terraform will fetch the modules again on the next init. They aren’t kept in memory, nor do they live in /tmp, and they are indeed cached for reuse.

When you run terraform init, Terraform downloads public registry modules to your local workspace and stores them on disk in a hidden .terraform directory inside your project. Specifically, the modules end up under .terraform/modules so Terraform can reuse them on subsequent runs without re-downloading. This cached copy is tied to the project directory, and if you delete the .terraform folder, Terraform will fetch the modules again on the next init. They aren’t kept in memory, nor do they live in /tmp, and they are indeed cached for reuse.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy