{"record":{"id":"a8e0b4f1f09411cc","repo":"hashicorp/terraform","slug":"operation-timed-out-a8e0b4","errorCode":null,"errorMessage":"operation timed out","messagePattern":"operation timed out","errorType":"console","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/d32a084675427f5ac3f7d2868578ef8b2c1dc525/internal/cloud/backend_common.go#L630-L666","documentation":"Returned by the cloud backend (cloud/backend_common.go:648) when the uploaded configuration version never reaches tfe.ConfigurationUploaded within the 60-iteration poll loop (backend_common.go:625-644). The backend uploads the config dir, then polls ConfigurationVersions.Read on planConfigurationVersionsPollInterval; if `uploaded` stays false it wraps a plain 'operation timed out' error via b.generalError with message 'Failed to upload configuration files'. Causes are server-side ingest lag, oversized config, or network interruption rather than an explicit timer.","triggerScenarios":"Running terraform plan/apply with the 'cloud' backend where the config-version upload HTTP call succeeds but TFE/HCP never marks the CV ConfigurationUploaded within the poll budget (cloud/backend_common.go:625-649).","commonSituations":"Large vendored directories exceeding server ingest speed. TFE/HCP platform slowness or partial outage. Proxies that complete uploads but interfere with subsequent status reads.","solutions":["Retry the operation — transient platform/network issues are the usual cause.","Check the workspace's configuration-version status in the TFC/HCP UI for ingest errors.","Shrink the upload with a .terraformignore excluding large/vendored files.","Confirm network/proxy connectivity to the TFC/HCP hostname."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"cv, err := b.cloudUploadConfig(...)\nif err != nil && strings.Contains(err.Error(), \"operation timed out\") {\n    // config version never reached ConfigurationUploaded; retry after backoff\n    return retryWithBackoff()\n}","preventionTips":["Keep config uploads lean with .terraformignore.","Confirm TFE/HCP platform health before large plans.","Retry transient ingest timeouts rather than editing state."],"tags":["terraform","cloud-backend","tfe","configuration-upload","network","timeout","plan"],"backgroundTag":null,"analyzedSha":"d32a084675427f5ac3f7d2868578ef8b2c1dc525","analyzedAt":"2026-08-11T18:43:52.779Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}