hashicorp/terraform · warning
Provider installation was canceled by an interrupt signal.
Error message
Provider installation was canceled by an interrupt signal.
What it means
Thrown after inst.EnsureProviderVersions returns when ctx.Err() == context.Canceled. This is a deliberate, user-initiated cancellation — the run was interrupted (Ctrl+C or SIGINT) while downloading state-store providers required for migration. No underlying err is wrapped; it is a fixed diagnostic.
Solutions
- Re-run `terraform state migrate` — provider install will resume from cache.
- Pre-install providers with `terraform init` so the migration has nothing to download.
- If using CI, raise the step timeout to cover a cold provider download.
- Avoid interrupting mid-migration: state is consistent but you will redo the install.
Example fix
# before terraform state migrate # Ctrl+C during download # after terraform init terraform state migrate
Defensive patterns
Strategy: try-catch
Try / catch
select {
case <-ctx.Done():
if ctx.Err() == context.Canceled {
diags = diags.Append(fmt.Errorf("Provider installation was canceled by an interrupt signal."))
return true, nil, Invalid, nil, diags
}
default:
} Prevention
- Pre-install providers with `terraform init` so migrations do not download at runtime.
- Raise CI step timeouts to cover cold provider downloads.
- Avoid Ctrl+C during provider install; let it complete or fail naturally.
- Use `terraform providers lock` to pre-seed the plugin cache for offline runs.
When it happens
Trigger: User presses Ctrl+C (or pipeline sends SIGINT / context cancel) while `terraform state migrate` is still installing state-store providers in EnsureProviderVersions. The install is aborted mid-download.
Common situations: Impatient Ctrl+C during a slow provider download; CI job timeout sending SIGTERM; orchestrator canceling the step; running in a wrapper that sends SIGINT on unrelated failure.
Related errors
- Failed to convert provider version to Go version
- Failed to set state store provider configuration
- schema version for in state does not match version from the…
- action schema not found for action
- Can't serialize backend configuration as JSON
AI-assisted analysis of hashicorp/terraform@d32a084675 (2026-08-11).
Data as JSON: /api/errors/78f244e3620762b8.
Report an issue: GitHub.
Appendix: source
Thrown at internal/command/state_migrate.go:606
}
// 2. Call the shared callback for FetchPackageSuccess
cb := fetchPackageSuccessCallback(view)
cb(provider, version, localDir, authResult)
},
ProvidersLockUpdated: providersLockUpdatedCallback(&c.incompleteProviders),
ProvidersFetched: providersFetchedCallback(view),
}
ctx = evts.OnContext(ctx)
mode := providercache.InstallNewProvidersOnly
if upgrade {
mode = providercache.InstallUpgrades
}
newLocks, err := inst.EnsureProviderVersions(ctx, locks, reqs, mode)
if ctx.Err() == context.Canceled {
diags = diags.Append(fmt.Errorf("Provider installation was canceled by an interrupt signal."))
return true, nil, Invalid, nil, diags
}
if err != nil {
// The errors captured in "err" should be redundant with what we
// received via the InstallerEvents callbacks above, so we'll
// just return those as long as we have some.
if !diags.HasErrors() {
diags = diags.Append(err)
}
return true, nil, Invalid, nil, diags
}
// Return advice to the calling code about what to do regarding safe state store provider installation
trust = c.determineIfProviderTrusted(stateStore.ProviderAddr, providerLocations, locks)
return true, newLocks, trust, stateStoreProviderAuthResult, diags
}View on GitHub (pinned to d32a084675)