hashicorp/terraform · error
Provider installation was canceled by an interrupt signal.
Error message
Provider installation was canceled by an interrupt signal.
What it means
Emitted by getProvidersFromPSSConfig after EnsureProviderVersions returns, when ctx.Err()==context.Canceled — meaning the state-store provider download was aborted by a cancellation of the command context, typically an interrupt signal. It is a deliberate, user-friendly replacement for whatever partial download error occurred. The command returns the diagnostic and stops (does not continue to write a lock file).
Source
Thrown at internal/command/init.go:541
// 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
}
// Determine which required providers are already downloaded, and download any
// new providers or newer versions of providers
lock, err := inst.EnsureProviderVersions(ctx, previousLocks, req, mode)
if ctx.Err() == context.Canceled {
diags = diags.Append(fmt.Errorf("Provider installation was canceled by an interrupt signal."))
view.Diagnostics(diags)
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(rootModEarly.StateStore.ProviderAddr, providerLocations, previousLocks)
return true, lock, trust, stateStoreProviderAuthResult, diagsView on GitHub (pinned to c9def3e214)
Solutions
- Re-run `terraform init`; provider downloads are resumable/idempotent and partially-downloaded packages are discarded safely.
- If downloads are slow, configure a provider plugin cache (`plugin_cache_dir`) or an on-prem mirror to speed subsequent installs.
- Increase or remove the CI step timeout for the init phase.
- Avoid interrupting init; a cancelled install leaves no lock-file change, so retrying is safe.
Example fix
# before $ terraform init # then Ctrl+C while downloading # after $ terraform init # let it finish; retry is safe
Defensive patterns
Strategy: try-catch
Try / catch
// Treat context cancellation as retriable for state-store provider install.
if errors.Is(runErr, context.Canceled) {
// safe to retry; no lock file is written on cancel
runErr = run("terraform", "init", "-enable-pluggable-state-storage-experiment")
} Prevention
- Avoid interrupting init during provider download; let it complete.
- Pre-warm a provider cache (plugin_cache_dir) or mirror so installs are fast.
- Give CI init steps generous timeouts to avoid scheduler-induced cancellation.
When it happens
Trigger: Pressing Ctrl+C (SIGINT) or otherwise cancelling the terraform process while it is downloading/installing the pluggable state-store provider during `terraform init`. Can also occur when a parent process/scheduler cancels the context (timeout, orchestration kill).
Common situations: Impatient operators hitting Ctrl+C during a slow provider download over a constrained network; CI runners that enforce a per-step timeout and cancel terraform mid-download; orchestrators (e.g. automation that cancels on a longer-than-expected run).
Related errors
- execution halted
- canceled reading current outputs
- error when obtaining provider instance during state store in
- Module installation was canceled by an interrupt signal.
- Module initialization was canceled by an interrupt signal.
AI-assisted analysis of hashicorp/terraform@c9def3e214 (2026-08-07).
Data as JSON: /api/errors/f29e269fd623c80f.
Report an issue: GitHub.