Skip to content
Latchkey

Terraform "timeout while waiting for plugin to start" in CI

Terraform launches each provider as a subprocess and waits for it to report ready. If the handshake does not complete in time -- a slow or starved runner, a partial download -- it errors.

What this error means

init/plan fails with "timeout while waiting for plugin to start" or "Failed to instantiate provider". It can be intermittent, passing on retry, which points at a transient launch problem rather than bad config.

terraform
Error: Failed to instantiate provider
"registry.terraform.io/hashicorp/aws" to obtain schema: timeout while waiting
for plugin to start

Common causes

Resource-starved or slow runner

A CPU/memory-starved runner, or heavy parallelism, can delay the plugin handshake past the startup timeout.

Partially downloaded or incompatible binary

A truncated provider download or an arch mismatch (e.g. arm64 vs amd64) leaves a binary that cannot start.

How to fix it

Retry and reduce parallelism

Re-run init/plan and lower -parallelism so plugin startup is not starved; clear the cache if a binary is suspect.

Terminal
rm -rf .terraform/providers
terraform init -input=false
terraform plan -input=false -parallelism=5

Ensure the correct provider binary

  1. Confirm the provider supports the runner OS/arch.
  2. Clear .terraform/providers and re-init to redownload cleanly.
  3. Avoid extreme parallelism on small runners.

How to prevent it

  • Use adequately sized runners for large provider graphs.
  • Keep provider downloads clean (cache validation, correct arch).
  • Run plan/apply on a platform that auto-retries transient plugin-start timeouts.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →