TF-004 Use the core Terraform workflow Practice Question
A developer runs `terraform init` in a directory containing Terraform configuration files. After initialization, they notice that a provider plugin was installed. Where are provider plugins stored locally by default?
⚠ Common exam trap
Watch out — candidates often confuse the legacy `~/.terraform.d/plugins` directory (used in Terraform versions before 0.13) with the modern default `.terraform` directory, leading them to select Option C instead of A.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
In a `.terraform` subdirectory of the current working directory
By default, `terraform init` downloads and installs provider plugins into a `.terraform` subdirectory within the current working directory. This local directory acts as the plugin cache for the specific configuration, ensuring that each Terraform project has its own isolated set of provider binaries. The `.terraform` directory is created automatically during initialization and is managed by Terraform to store plugins, modules, and state data.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
In a `.terraform` subdirectory of the current working directory
Why this is correct
Correct! Provider plugins are stored in `.terraform/providers/`.
- ✗
In the system-wide plugin directory `/usr/share/terraform/plugins`
Why it's wrong here
This is not the default location; the default is the .terraform directory.
- ✗
In the user's home directory under `~/.terraform.d/plugins`
Why it's wrong here
This is the plugin cache directory, not the default working directory location.
- ✗
In a temporary directory that is deleted after `terraform init` completes
Why it's wrong here
Plugins persist after init; they are not deleted.
Go deeper
Related to this question
About these practice questions
This TF-004 question is part of Courseiva's 428-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This TF-004 practice question is part of Courseiva's free HashiCorp certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the TF-004 exam.