hashicorp/terraform · error
error marshaling action invocations
Error message
error marshaling action invocations: %s
What it means
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.
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).
Defensive patterns
Strategy: try-catch
Try / catch
if _, err := MarshalActionInvocations(p.Changes.ActionInvocations, schemas); err != nil {
return err // unwrap to identify the per-action failure (602–607)
} Prevention
- Initialize all action providers before rendering.
- Keep ephemeral/unsupported marks out of action config.
- Align Terraform/provider versions between plan and render.
When it happens
Trigger: 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).
Common situations: Action invocations referencing providers/action types not initialized; version skew; ephemeral values flowing into action config.
Related errors
- error in marshaling deferred action invocations
- failed to decode action
- action has config values with unsupported marks
- action has ephemeral config values, which are not supported…
- error in marshaling deferred resource changes
AI-assisted analysis of hashicorp/terraform@d32a084675 (2026-08-11).
Data as JSON: /api/errors/0a80e05e36b747b4.
Report an issue: GitHub.
Appendix: source
Thrown at internal/command/jsonplan/plan.go:350
// output.PriorState
if sf != nil && !sf.State.Empty() {
output.PriorState, err = jsonstate.Marshal(sf, schemas)
if err != nil {
return nil, fmt.Errorf("error marshaling prior state: %s", err)
}
}
// output.Config
output.Config, err = jsonconfig.Marshal(config, schemas)
if err != nil {
return nil, fmt.Errorf("error marshaling config: %s", err)
}
// output.Changes.ActionInvocations
if p.Changes.ActionInvocations != nil {
if output.ActionInvocations, err = MarshalActionInvocations(p.Changes.ActionInvocations, schemas); err != nil {
return nil, fmt.Errorf("error marshaling action invocations: %s", err)
}
}
return json.Marshal(output)
}
func (p *plan) marshalPlanVariables(vars map[string]plans.DynamicValue, decls map[string]*configs.Variable) error {
p.Variables = make(variables, len(vars))
for k, v := range vars {
val, err := v.Decode(cty.DynamicPseudoType)
if err != nil {
return err
}
valJSON, err := ctyjson.Marshal(val, val.Type())
if err != nil {
return err
}View on GitHub (pinned to d32a084675)