hashicorp/terraform · error
operation timed out
Error message
operation timed out
What it means
Returned by the cloud backend after uploading the configuration tarball: it polls ConfigurationVersions.Read up to 60 times for cv.Status to become tfe.ConfigurationUploaded; if it never does, the upload is reported as failed with a wrapped 'operation timed out'. This is the cloud-backend (HCP/TFE) equivalent of the remote-backend timeout.
Source
Thrown at internal/cloud/backend_common.go:648
case <-cancelCtx.Done():
log.Printf("[TRACE] backend/cloud: operation cancelled while waiting for configuration status")
return nil, context.Canceled
case <-time.After(planConfigurationVersionsPollInterval):
log.Printf("[TRACE] backend/cloud: reading configuration status")
cv, err = b.client.ConfigurationVersions.Read(stopCtx, cv.ID)
if err != nil {
return nil, b.generalError("Failed to retrieve configuration version", err)
}
if cv.Status == tfe.ConfigurationUploaded {
uploaded = true
}
}
}
if !uploaded {
return nil, b.generalError(
"Failed to upload configuration files", errors.New("operation timed out"))
}
log.Printf("[TRACE] backend/cloud: configuration uploaded and ready")
return cv, nil
}
func (b *Cloud) parseRunVariables(op *backendrun.Operation) ([]*tfe.RunVariable, error) {
config, configDiags := op.ConfigLoader.LoadRootModule(op.ConfigDir)
if configDiags.HasErrors() {
return nil, fmt.Errorf("error loading config with snapshot: %w", configDiags.Errs()[0])
}
variables, varDiags := ParseCloudRunVariables(op.Variables, config.Variables)
if varDiags.HasErrors() {
return nil, varDiags.Err()
}View on GitHub (pinned to c9def3e214)
Solutions
- Retry the run — most causes are transient.
- Check the HCP/TFE status page and the configuration version status in the workspace UI.
- Confirm network egress and that the upload URL is reachable without a proxy timing out.
- Reduce upload size if uploads are chronically slow (large vendored binaries, .terraform cruft).
Defensive patterns
Strategy: retry
Try / catch
// Bounded retry for cloud-backend upload timeouts:
for attempt := 0; attempt < 3; attempt++ {
cv, err := b.uploadConfig(ctx, op)
if err == nil { return cv, nil }
if isTimeoutErr(err) && attempt < 2 {
select { case <-time.After(backoff(attempt)): case <-ctx.Done(): return nil, ctx.Err() }
continue
}
return nil, err
} Prevention
- Keep uploads small and free of .terraform cruft.
- Monitor HCP/TFE status before runs.
- Use a stable network path; avoid flaky proxies.
- Distinguish timeout from cancellation before retrying.
When it happens
Trigger: Running 'terraform plan/apply' with the 'cloud' backend where HCP Terraform / TFE never flips the configuration version to 'uploaded' within the poll window.
Common situations: HCP/TFE processing delay, network interruption mid-upload, backend under load, or the configuration version stuck in 'pending'/'errored'.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- operation timed out
- your version of Terraform Enterprise does not support key-va
- {joined API error payload}
- {r.Status}
- a network issue prevented cloud configuration; %w
AI-assisted analysis of hashicorp/terraform@c9def3e214 (2026-08-07).
Data as JSON: /api/errors/a8e0b4f1f09411cc.
Report an issue: GitHub.