{"record":{"id":"47d9e3372b033449","repo":"hashicorp/terraform","slug":"couldn-t-read-information-for-cloud-run-s-w","errorCode":null,"errorMessage":"couldn't read information for cloud run %s: %w","messagePattern":"couldn't read information for cloud run (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/cloud/backend_show.go","lineNumber":36,"sourceCode":"// returns it in a cloudplan.RemotePlanJSON wrapper struct (along with various\n// metadata required by terraform show). It's intended for use by the terraform\n// show command, in order to format and display a saved cloud plan.\nfunc (b *Cloud) ShowPlanForRun(ctx context.Context, runID, runHostname string, redacted bool) (*cloudplan.RemotePlanJSON, error) {\n\tvar jsonBytes []byte\n\tmode := plans.NormalMode\n\tvar opts []plans.Quality\n\n\t// Bail early if wrong hostname\n\tif runHostname != b.Hostname {\n\t\treturn nil, fmt.Errorf(\"hostname for run (%s) does not match the configured cloud integration (%s)\", runHostname, b.Hostname)\n\t}\n\n\t// Get run and plan\n\tr, err := b.client.Runs.ReadWithOptions(ctx, runID, &tfe.RunReadOptions{Include: []tfe.RunIncludeOpt{tfe.RunPlan, tfe.RunWorkspace}})\n\tif err == tfe.ErrResourceNotFound {\n\t\treturn nil, fmt.Errorf(\"couldn't read information for cloud run %s; make sure you've run `terraform login` and that you have permission to view the run\", runID)\n\t} else if err != nil {\n\t\treturn nil, fmt.Errorf(\"couldn't read information for cloud run %s: %w\", runID, err)\n\t}\n\n\t// Sort out the run mode\n\tif r.IsDestroy {\n\t\tmode = plans.DestroyMode\n\t} else if r.RefreshOnly {\n\t\tmode = plans.RefreshOnlyMode\n\t}\n\n\t// Check that the plan actually finished\n\tswitch r.Plan.Status {\n\tcase tfe.PlanErrored:\n\t\t// Errored plans might still be displayable, but we want to mention it to the renderer.\n\t\topts = append(opts, plans.Errored)\n\tcase tfe.PlanFinished:\n\t\t// Good to go, but alert the renderer if it has no changes.\n\t\tif !r.Plan.HasChanges {\n\t\t\topts = append(opts, plans.NoChanges)","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/hashicorp/terraform/blob/d32a084675427f5ac3f7d2868578ef8b2c1dc525/internal/cloud/backend_show.go#L18-L54","documentation":"Thrown by Cloud.ShowPlanForRun when b.client.Runs.ReadWithOptions fails with any error other than tfe.ErrResourceNotFound. The wrapped %w carries the underlying transport, server, or decoding error from the TFE client.","triggerScenarios":"Runs.ReadWithOptions errors on a 5xx server response, network timeout, TLS/cert error, response-decoding failure, or context cancellation. Distinct from 404 (handled at line 34), this is the catch-all for infrastructure-level failures.","commonSituations":"Self-hosted TFE temporarily down or restarting; a network partition between the client and TFE; an expired/invalid token producing a non-404 error; client context cancelled (e.g. Ctrl-C during show).","solutions":["Inspect the wrapped `%w` cause to identify transport, server, or auth errors.","Retry the `terraform show` command for transient network/5xx failures.","Verify network connectivity and TLS trust to the TFE hostname.","If the context was cancelled, re-run without interrupting."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"r, err := b.client.Runs.ReadWithOptions(ctx, runID, opts)\nif err != nil && err != tfe.ErrResourceNotFound {\n    // classify: transient -> retry; fatal -> surface\n}","preventionTips":["Maintain stable network/TLS to the TFE hostname.","Retry transient 5xx/network failures on `terraform show`.","Avoid interrupting the show operation (context cancellation)."],"tags":["terraform","show","cloud-plan","network","api","retry"],"backgroundTag":null,"analyzedSha":"d32a084675427f5ac3f7d2868578ef8b2c1dc525","analyzedAt":"2026-08-11T18:43:52.779Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}