{"record":{"id":"a8e0b4f1f09411cc","repo":"hashicorp/terraform","slug":"operation-timed-out-a8e0b4","errorCode":null,"errorMessage":"operation timed out","messagePattern":"operation timed out","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/cloud/backend_common.go","lineNumber":648,"sourceCode":"\t\tcase <-cancelCtx.Done():\n\t\t\tlog.Printf(\"[TRACE] backend/cloud: 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/cloud: 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, b.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, b.generalError(\n\t\t\t\"Failed to upload configuration files\", errors.New(\"operation timed out\"))\n\t}\n\n\tlog.Printf(\"[TRACE] backend/cloud: configuration uploaded and ready\")\n\n\treturn cv, nil\n}\n\nfunc (b *Cloud) parseRunVariables(op *backendrun.Operation) ([]*tfe.RunVariable, error) {\n\tconfig, configDiags := op.ConfigLoader.LoadRootModule(op.ConfigDir)\n\tif configDiags.HasErrors() {\n\t\treturn nil, fmt.Errorf(\"error loading config with snapshot: %w\", configDiags.Errs()[0])\n\t}\n\n\tvariables, varDiags := ParseCloudRunVariables(op.Variables, config.Variables)\n\n\tif varDiags.HasErrors() {\n\t\treturn nil, varDiags.Err()\n\t}","sourceCodeStart":630,"sourceCodeEnd":666,"githubUrl":"https://github.com/hashicorp/terraform/blob/c9def3e214014c1188faabfc4a5bde5095139765/internal/cloud/backend_common.go#L630-L666","documentation":"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.","triggerScenarios":"Running 'terraform plan/apply' with the 'cloud' backend where HCP Terraform / TFE never flips the configuration version to 'uploaded' within the poll window.","commonSituations":"HCP/TFE processing delay, network interruption mid-upload, backend under load, or the configuration version stuck in 'pending'/'errored'.","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)."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Bounded retry for cloud-backend upload timeouts:\nfor attempt := 0; attempt < 3; attempt++ {\n    cv, err := b.uploadConfig(ctx, op)\n    if err == nil { return cv, nil }\n    if isTimeoutErr(err) && attempt < 2 {\n        select { case <-time.After(backoff(attempt)): case <-ctx.Done(): return nil, ctx.Err() }\n        continue\n    }\n    return nil, err\n}","preventionTips":["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."],"tags":["terraform","cloud-backend","hcp","tfe","network","timeout"],"analyzedSha":"c9def3e214014c1188faabfc4a5bde5095139765","analyzedAt":"2026-08-07T15:39:49.278Z","schemaVersion":2},"datasetVersion":"2026-08-07T21:17:07.882Z"}