{"record":{"id":"1d0e864c796a6f32","repo":"hashicorp/terraform","slug":"operation-timed-out","errorCode":null,"errorMessage":"operation timed out","messagePattern":"operation timed out","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/backend/remote/backend_plan.go","lineNumber":292,"sourceCode":"\t\tcase <-cancelCtx.Done():\n\t\t\tlog.Printf(\"[TRACE] backend/remote: operation cancelled while waiting for configuration status\")\n\t\t\treturn nil, context.Canceled\n\t\tcase <-time.After(planConfigurationVersionsPollInterval):\n\t\t\tlog.Printf(\"[TRACE] backend/remote: reading configuration status\")\n\t\t\tcv, err = b.client.ConfigurationVersions.Read(stopCtx, cv.ID)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, generalError(\"Failed to retrieve configuration version\", err)\n\t\t\t}\n\n\t\t\tif cv.Status == tfe.ConfigurationUploaded {\n\t\t\t\tuploaded = true\n\t\t\t}\n\t\t}\n\t}\n\n\tif !uploaded {\n\t\treturn nil, generalError(\n\t\t\t\"Failed to upload configuration files\", errors.New(\"operation timed out\"))\n\t}\n\n\tlog.Printf(\"[TRACE] backend/remote: configuration uploaded and ready\")\n\trunOptions := tfe.RunCreateOptions{\n\t\tConfigurationVersion: cv,\n\t\tRefresh:              tfe.Bool(op.PlanRefresh),\n\t\tWorkspace:            w,\n\t}\n\n\tswitch op.PlanMode {\n\tcase plans.NormalMode:\n\t\t// okay, but we don't need to do anything special for this\n\tcase plans.RefreshOnlyMode:\n\t\trunOptions.RefreshOnly = tfe.Bool(true)\n\tcase plans.DestroyMode:\n\t\trunOptions.IsDestroy = tfe.Bool(true)\n\tdefault:\n\t\t// Shouldn't get here because we should update this for each new","sourceCodeStart":274,"sourceCodeEnd":310,"githubUrl":"https://github.com/hashicorp/terraform/blob/c9def3e214014c1188faabfc4a5bde5095139765/internal/backend/remote/backend_plan.go#L274-L310","documentation":"Returned by the remote backend after uploading configuration files: it polls ConfigurationVersions.Read up to 60 times waiting for cv.Status to become tfe.ConfigurationUploaded. If the status never reaches 'uploaded' within that window, the upload is treated as failed with a wrapped 'operation timed out' error.","triggerScenarios":"Calling 'terraform plan'/'apply' on a 'remote' backend where the TFE instance never acknowledges the uploaded configuration tarball within ~60 poll intervals (planConfigurationVersionsPollInterval each).","commonSituations":"TFE/HCP backend slow to process uploads; network interruption during upload; backend under heavy load; misconfigured upload URL; the configuration version stuck in 'pending'.","solutions":["Retry the operation — transient backend load or network blips are the most common cause.","Check TFE/HCP status page and the configuration version status in the UI for stuck/in-error states.","Verify network connectivity and that the TFE host is reachable and not rate-limiting.","Increase backend capacity or reduce upload size (remove large vendored files) if uploads are chronically slow."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Wrap the plan op in a bounded retry with backoff for upload timeouts:\nvar plan *plans.Plan\nfor attempt := 0; attempt < 3; attempt++ {\n    p, err := b.Operation(ctx, op)\n    if err == nil { plan = p; break }\n    if isTimeoutErr(err) && attempt < 2 {\n        time.Sleep(time.Duration(math.Pow(2, float64(attempt))) * time.Second)\n        continue\n    }\n    return nil, err\n}","preventionTips":["Keep configuration uploads small (avoid vendoring large binaries).","Monitor TFE/HCP health before kicking off runs.","Use a stable, low-latency network path to the backend.","Distinguish a true timeout from a context cancellation before retrying."],"tags":["terraform","remote-backend","tfe","network","timeout"],"analyzedSha":"c9def3e214014c1188faabfc4a5bde5095139765","analyzedAt":"2026-08-07T15:39:49.278Z","schemaVersion":2},"datasetVersion":"2026-08-07T21:17:07.882Z"}