{"record":{"id":"fae6b5bbc1df4cf7","repo":"hashicorp/terraform","slug":"error-marshaling-relevant-attributes-for-external","errorCode":null,"errorMessage":"error marshaling relevant attributes for external changes: %s","messagePattern":"error marshaling relevant attributes for external changes: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/command/jsonplan/plan.go","lineNumber":298,"sourceCode":"\t\t// we skip them here.\n\t\tvar driftedResources []*plans.ResourceInstanceChangeSrc\n\t\tif p.UIMode == plans.RefreshOnlyMode {\n\t\t\tdriftedResources = p.DriftedResources\n\t\t} else {\n\t\t\tfor _, dr := range p.DriftedResources {\n\t\t\t\tif dr.Action != plans.NoOp {\n\t\t\t\t\tdriftedResources = append(driftedResources, dr)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\toutput.ResourceDrift, err = MarshalResourceChanges(driftedResources, schemas)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error in marshaling resource drift: %s\", err)\n\t\t}\n\t}\n\n\tif err := output.marshalRelevantAttrs(p); err != nil {\n\t\treturn nil, fmt.Errorf(\"error marshaling relevant attributes for external changes: %s\", err)\n\t}\n\n\t// output.ResourceChanges\n\tif p.Changes != nil {\n\t\toutput.ResourceChanges, err = MarshalResourceChanges(p.Changes.Resources, schemas)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error in marshaling resource changes: %s\", err)\n\t\t}\n\t}\n\n\tif p.DeferredResources != nil {\n\t\toutput.DeferredChanges, err = MarshalDeferredResourceChanges(p.DeferredResources, schemas)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error in marshaling deferred resource changes: %s\", err)\n\t\t}\n\t}\n\n\tif p.DeferredActionInvocations != nil {","sourceCodeStart":280,"sourceCodeEnd":316,"githubUrl":"https://github.com/hashicorp/terraform/blob/d32a084675427f5ac3f7d2868578ef8b2c1dc525/internal/command/jsonplan/plan.go#L280-L316","documentation":"Top-level propagation error from Marshal: marshalRelevantAttrs failed. This step computes the set of attributes relevant to external changes for the rendered plan. Failure typically comes from path or schema handling during relevance computation.","triggerScenarios":"Plan contains relevant-attribute paths that reference resource types whose schema is missing at render time, or path steps that fail to match against the current schema.","commonSituations":"Cross-version rendering where relevant-attribute paths were computed by a newer Terraform; provider schemas not fully loaded.","solutions":["Read the wrapped error to identify the attribute path or resource at fault.","Regenerate the plan with the current Terraform and providers.","Ensure all providers referenced by the plan are initialized.","Upgrade Terraform if the relevant-attributes feature is newer than this binary supports."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := output.marshalRelevantAttrs(p); err != nil {\n    return nil, fmt.Errorf(\"relevant-attrs render failed: %%w\", err)\n}","preventionTips":["Render plans with the same Terraform version that produced them.","Keep provider schemas fully loaded when rendering."],"tags":["go","terraform","plan","relevant-attributes","external-changes","error-wrapping","jsonplan"],"backgroundTag":null,"analyzedSha":"d32a084675427f5ac3f7d2868578ef8b2c1dc525","analyzedAt":"2026-08-11T18:43:52.779Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}