{"record":{"id":"0a80e05e36b747b4","repo":"hashicorp/terraform","slug":"error-marshaling-action-invocations-s","errorCode":null,"errorMessage":"error marshaling action invocations: %s","messagePattern":"error marshaling action invocations: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/command/jsonplan/plan.go","lineNumber":350,"sourceCode":"\n\t// output.PriorState\n\tif sf != nil && !sf.State.Empty() {\n\t\toutput.PriorState, err = jsonstate.Marshal(sf, schemas)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error marshaling prior state: %s\", err)\n\t\t}\n\t}\n\n\t// output.Config\n\toutput.Config, err = jsonconfig.Marshal(config, schemas)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error marshaling config: %s\", err)\n\t}\n\n\t// output.Changes.ActionInvocations\n\tif p.Changes.ActionInvocations != nil {\n\t\tif output.ActionInvocations, err = MarshalActionInvocations(p.Changes.ActionInvocations, schemas); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error marshaling action invocations: %s\", err)\n\t\t}\n\t}\n\n\treturn json.Marshal(output)\n}\n\nfunc (p *plan) marshalPlanVariables(vars map[string]plans.DynamicValue, decls map[string]*configs.Variable) error {\n\tp.Variables = make(variables, len(vars))\n\n\tfor k, v := range vars {\n\t\tval, err := v.Decode(cty.DynamicPseudoType)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tvalJSON, err := ctyjson.Marshal(val, val.Type())\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}","sourceCodeStart":332,"sourceCodeEnd":368,"githubUrl":"https://github.com/hashicorp/terraform/blob/d32a084675427f5ac3f7d2868578ef8b2c1dc525/internal/command/jsonplan/plan.go#L332-L368","documentation":"Top-level propagation error from Marshal: MarshalActionInvocations failed on p.Changes.ActionInvocations. This delegates to the per-action logic (errors 602–607), so the wrapped error identifies which action and which sub-failure occurred.","triggerScenarios":"Any per-action failure for a non-deferred action invocation: missing schema (603), decode failure (604), unsupported trigger (605), ephemeral marks (606), or unsupported marks (607).","commonSituations":"Action invocations referencing providers/action types not initialized; version skew; ephemeral values flowing into action config.","solutions":["Read the wrapped error — it is one of 602–607.","Re-init providers and regenerate the plan.","Align Terraform and provider versions.","Remove ephemeral inputs from action invocation config (see 606)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if _, err := MarshalActionInvocations(p.Changes.ActionInvocations, schemas); err != nil {\n    return err // unwrap to identify the per-action failure (602–607)\n}","preventionTips":["Initialize all action providers before rendering.","Keep ephemeral/unsupported marks out of action config.","Align Terraform/provider versions between plan and render."],"tags":["go","terraform","plan","actions","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"}