hashicorp/terraform · error
unsupported action %q
Error message
unsupported action %q
What it means
Returned by Provider.PlanAction at provider.go:339. The switch over req.ActionType contains only a default case, so ANY action type submitted for planning is rejected. The builtin provider has registered zero action types, so the PlanAction RPC is effectively unsupported.
Source
Thrown at internal/builtin/providers/terraform/provider.go:339
func (p *Provider) GetStates(req providers.GetStatesRequest) providers.GetStatesResponse {
var resp providers.GetStatesResponse
resp.Diagnostics = resp.Diagnostics.Append(fmt.Errorf("unsupported state store type %q", req.TypeName))
return resp
}
func (p *Provider) DeleteState(req providers.DeleteStateRequest) providers.DeleteStateResponse {
var resp providers.DeleteStateResponse
resp.Diagnostics = resp.Diagnostics.Append(fmt.Errorf("unsupported state store type %q", req.TypeName))
return resp
}
func (p *Provider) PlanAction(req providers.PlanActionRequest) providers.PlanActionResponse {
var resp providers.PlanActionResponse
switch req.ActionType {
default:
resp.Diagnostics = resp.Diagnostics.Append(fmt.Errorf("unsupported action %q", req.ActionType))
}
return resp
}
func (p *Provider) InvokeAction(req providers.InvokeActionRequest) providers.InvokeActionResponse {
var resp providers.InvokeActionResponse
switch req.ActionType {
default:
resp.Diagnostics = resp.Diagnostics.Append(fmt.Errorf("unsupported action %q", req.ActionType))
}
return resp
}
func (p *Provider) ValidateActionConfig(req providers.ValidateActionConfigRequest) providers.ValidateActionConfigResponse {
var resp providers.ValidateActionConfigResponseView on GitHub (pinned to c9def3e214)
Solutions
- Remove the action configuration block from your configuration; the builtin provider does not support actions.
- Upgrade or downgrade Terraform Core so the action RPC version matches a provider that actually implements actions.
- If writing a provider, implement PlanAction with real cases rather than relying on the builtin.
Example fix
// before
provider.PlanAction(req) // unsupported action "foo"
// after: only call PlanAction on a provider that registers actions
if _, ok := provider.(providers.ActionProvider); ok { provider.PlanAction(req) } Defensive patterns
Strategy: validation
Validate before calling
// Only call PlanAction if the provider schema advertises action types.
func providerHasActions(p providers.Interface) bool {
schema := p.GetProviderSchema()
return len(schema.ActionTypes) > 0
}
if providerHasActions(provider) {
provider.PlanAction(req)
} else {
// skip action planning for this provider
} Prevention
- Gate action RPCs on GetProviderSchema().ActionTypes being non-empty.
- Do not declare action blocks against the terraform builtin provider.
When it happens
Trigger: Core sends a PlanActionRequest with any ActionType to the builtin 'terraform' provider; the switch falls through to default and appends the error.
Common situations: A provider schema or Terraform Core build that expects the builtin provider to advertise ephemeral/action resources; a misconfigured action block referencing the terraform builtin; forward-compatibility code that runs against an older builtin provider.
Related errors
- unrecognized action slice:
- at most 1 action can be invoked per operation
- invalid remote plan format, must be 1
- error: using a saved cloud plan when executing Terraform loc
- Error: unsupported data source %s
AI-assisted analysis of hashicorp/terraform@c9def3e214 (2026-08-07).
Data as JSON: /api/errors/f84fe63ee5b504d2.
Report an issue: GitHub.