{"record":{"id":"d8b4fdf0db8a70f5","repo":"hashicorp/terraform","slug":"can-t-display-a-cloud-plan-that-is-currently-s","errorCode":null,"errorMessage":"can't display a cloud plan that is currently %s","messagePattern":"can't display a cloud plan that is currently (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"internal/cloud/backend_show.go","lineNumber":58,"sourceCode":"\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)\n\t\t}\n\tdefault:\n\t\t// Bail, we can't use this.\n\t\terr = fmt.Errorf(\"can't display a cloud plan that is currently %s\", r.Plan.Status)\n\t\treturn nil, err\n\t}\n\n\t// Fetch the json plan!\n\tif redacted {\n\t\tjsonBytes, err = readRedactedPlan(ctx, b.client.BaseURL(), b.Token, r.Plan.ID)\n\t} else {\n\t\tjsonBytes, err = b.client.Plans.ReadJSONOutput(ctx, r.Plan.ID)\n\t}\n\tif err == tfe.ErrResourceNotFound {\n\t\tif redacted {\n\t\t\treturn nil, fmt.Errorf(\"couldn't read plan data for cloud run %s; make sure you've run `terraform login` and that you have permission to view the run\", runID)\n\t\t} else {\n\t\t\treturn nil, fmt.Errorf(\"couldn't read unredacted JSON plan data for cloud run %s; make sure you've run `terraform login` and that you have admin permissions on the workspace\", runID)\n\t\t}\n\t} else if err != nil {\n\t\treturn nil, fmt.Errorf(\"couldn't read plan data for cloud run %s: %w\", runID, err)\n\t}","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/hashicorp/terraform/blob/d32a084675427f5ac3f7d2868578ef8b2c1dc525/internal/cloud/backend_show.go#L40-L76","documentation":"Thrown by Cloud.ShowPlanForRun in the default branch of the switch over r.Plan.Status. Only PlanFinished and PlanErrored are displayable (errored plans may still have partial output). Any other status — pending, queued, running, canceled, canceled-by-user — means the plan is not in a viewable final state and cannot be rendered.","triggerScenarios":"The referenced run's plan is still in progress (status pending/running/queued) or was canceled before producing output. `terraform show` on a cloud plan reference whose plan hasn't reached a terminal state.","commonSituations":"Showing a plan reference for a run that is still executing; showing a plan that was canceled; race between plan creation and `terraform show` before the plan finishes streaming.","solutions":["Wait for the run's plan to reach 'finished' (or 'errored') status in HCP Terraform, then re-run `terraform show`.","If the plan was canceled, start a new run and show that one instead.","Check the run status in the HCP Terraform UI to confirm it has reached a terminal plan state."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Poll run plan status until terminal before showing.\nfor r.Plan.Status != tfe.PlanFinished && r.Plan.Status != tfe.PlanErrored {\n    // wait and re-read r\n}","typeGuard":"func planDisplayable(s tfe.PlanStatus) bool {\n    return s == tfe.PlanFinished || s == tfe.PlanErrored\n}","tryCatchPattern":null,"preventionTips":["Wait until the run's plan reaches 'finished' before `terraform show`.","Re-show against a fresh run if the original was canceled.","Check plan status in the HCP Terraform UI first."],"tags":["terraform","show","cloud-plan","plan-status","async","wait"],"backgroundTag":null,"analyzedSha":"d32a084675427f5ac3f7d2868578ef8b2c1dc525","analyzedAt":"2026-08-11T18:43:52.779Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}