hashicorp/terraform · error

no schema found for (in provider )

Error message

no schema found for %s (in provider %s)

What it means

Returned when marshaling a single action invocation: schemas.ActionTypeConfig returned a schema whose ConfigSchema is nil, meaning the provider is not advertising the requested action type to Terraform. The plan references an action type the loaded schema set does not contain.

Solutions

  1. Run `terraform init -upgrade` to fetch a provider version that defines the action type.
  2. Verify the provider version in .terraform.lock.hcl supports the action type named in the error.
  3. Regenerate the plan with the current provider set so plan and schema agree.
  4. Remove or comment out the action block if the provider intentionally no longer supports it.
Defensive patterns

Strategy: validation

Validate before calling

// Verify the action type schema exists before marshaling invocations.
func actionSchemaPresent(schemas *terraform.Schemas, provider addrs.Provider, actionType string) bool {
    s := schemas.ActionTypeConfig(provider, actionType)
    return s.ConfigSchema != nil
}

Prevention

When it happens

Trigger: Provider plugin version that predates the action type; provider not initialized; plugin cache serving a stale/older provider; action type string mismatch between plan and provider.

Common situations: After an upgrade/downgrade of a provider that added or removed an action; CI with a locked, older provider version; local dev with a hand-registered provider missing action schemas.

Related errors


AI-assisted analysis of hashicorp/terraform@d32a084675 (2026-08-11). Data as JSON: /api/errors/57823e8ef965d523. Report an issue: GitHub.

Appendix: source

Thrown at internal/command/jsonplan/action_invocations.go:127

		}
		ret = append(ret, ai)
	}
	return ret, nil
}

func MarshalActionInvocation(action *plans.ActionInvocationInstanceSrc, schemas *terraform.Schemas) (ActionInvocation, error) {
	ai := ActionInvocation{
		Address:      action.Addr.String(),
		Type:         action.Addr.Action.Action.Type,
		Name:         action.Addr.Action.Action.Name,
		ProviderName: action.ProviderAddr.Provider.String(),
	}
	schema := schemas.ActionTypeConfig(
		action.ProviderAddr.Provider,
		action.Addr.Action.Action.Type,
	)
	if schema.ConfigSchema == nil {
		return ai, fmt.Errorf("no schema found for %s (in provider %s)", action.Addr.Action.Action.Type, action.ProviderAddr.Provider)
	}

	actionDec, err := action.Decode(&schema)
	if err != nil {
		return ai, fmt.Errorf("failed to decode action %s: %w", action.Addr, err)
	}

	switch at := action.ActionTrigger.(type) {
	case *plans.ResourceActionTrigger:
		ai.LifecycleActionTrigger = &LifecycleActionTrigger{
			TriggeringResourceAddress: at.TriggeringResourceAddr.String(),
			ActionTriggerEvent:        at.TriggerEvent().String(),
			ActionTriggerBlockIndex:   at.ActionTriggerBlockIndex,
			ActionsListIndex:          at.ActionsListIndex,
			OnFailure:                 at.ActionOnFailure.String(),
		}
	case *plans.InvokeActionTrigger:
		ai.InvokeActionTrigger = &InvokeActionTrigger{}

View on GitHub (pinned to d32a084675)