Study HashiCorp Terraform 004 Providers and Plugins: key concepts, common traps, and exam decision cues.
Providers are one of the most tested Terraform nouns because they sit between Terraform and the platform being managed. The exam expects you to know that Terraform installs provider plugins, respects version requirements, and records provider selections in the lock file.
| Stage | What happens |
|---|---|
| declare provider requirements | configuration states which providers and versions are needed |
| initialize the directory | terraform init installs the needed provider plugins |
| lock selections | .terraform.lock.hcl records provider version selections and checksums |
| run Terraform workflow | Terraform uses the installed plugins to plan and apply changes |
| Concept | What it is |
|---|---|
| provider | the Terraform integration for a platform or service family |
| provider plugin | the executable implementation Terraform uses |
| required providers | version and source requirements declared in configuration |
| lock file | record of selected provider versions and checksums |
| Trap | Better rule |
|---|---|
| saying the lock file controls module versions | the lock file records provider selections, not module versions |
| treating provider config like backend config | providers manage platforms; backends manage state |
forgetting that init prepares provider plugins |
provider installation is part of initialization |
init to plugin installationProvider questions usually reward separation of roles. Providers integrate Terraform with platforms. Version constraints control acceptable ranges. The lock file records chosen provider versions and checksums. terraform init installs what the configuration requires. When the exam mixes those ideas together, choose the answer that keeps plugin installation, version selection, and platform integration in separate buckets.