Interview Prep/Terraform/Partial Applies, Version Mismatches and CI Failures

Your CI apply worked yesterday, today `terraform init` fails with `Error: Failed to query available provider packages` for a pinned community provider version that "disappeared".

AdvancedTroubleshootingPartial Applies, Version Mismatches and CI Failures
Answer

Likely causes → The provider author yanked or deleted that release, or moved the provider to a new namespace; the registry no longer serves it.

Diagnose → Check the provider's registry page and GitHub releases; terraform providers shows which modules require it.

Fix → Move to the nearest available version (update constraints and terraform init -upgrade), or switch to the new namespace with terraform state replace-provider:

terraform state replace-provider registry.terraform.io/oldns/kubectl registry.terraform.io/newns/kubectl

Prevent → Mirror every provider you depend on internally, prefer well-maintained providers, and keep the mirror as the source of truth for CI.

All Terraform questions

More on Partial Applies, Version Mismatches and CI Failures