Interview Prep/Terraform/Dependencies, Cycles and Providers

`Error: Required plugins are not installed` — `there is no package for registry.terraform.io/hashicorp/aws 5.72.1 cached in .terraform/providers`.

BeginnerTroubleshootingDependencies, Cycles and Providers
Answer

Likely causes → The lock file was updated (pulled new commits) but .terraform/providers still has the old version; or the CI job restored a stale .terraform cache.

Diagnose → ls .terraform/providers/registry.terraform.io/hashicorp/aws/

Fix → terraform init (not -upgrade; the lock file already chooses the version).

Prevent → Cache providers by lock-file hash, and don't cache the whole .terraform directory.

All Terraform questions Roadmap: Terraform

More on Dependencies, Cycles and Providers