{"record":{"id":"7dc58bc695636dbb","repo":"hashicorp/terraform","slug":"action-schema-not-found-for-action-q","errorCode":null,"errorMessage":"action schema not found for action %q","messagePattern":"action schema not found for action %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/grpcwrap/provider.go","lineNumber":855,"sourceCode":"\t\t\tdisplayName = item.GetAttr(\"display_name\").AsString()\n\t\t}\n\n\t\tres.Send(&tfplugin5.ListResource_Event{\n\t\t\tIdentity:       &tfplugin5.ResourceIdentityData{IdentityData: identityVal},\n\t\t\tResourceObject: stateVal,\n\t\t\tDisplayName:    displayName,\n\t\t})\n\t}\n\n\treturn nil\n}\n\nfunc (p *provider) PlanAction(_ context.Context, req *tfplugin5.PlanAction_Request) (*tfplugin5.PlanAction_Response, error) {\n\tresp := &tfplugin5.PlanAction_Response{}\n\n\tactionSchema, ok := p.schema.Actions[req.ActionType]\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"action schema not found for action %q\", req.ActionType)\n\t}\n\n\tty := actionSchema.ConfigSchema.ImpliedType()\n\tconfigVal, err := decodeDynamicValue(req.Config, ty)\n\tif err != nil {\n\t\tresp.Diagnostics = convert.AppendProtoDiag(resp.Diagnostics, err)\n\t\treturn resp, nil\n\t}\n\n\tplanResp := p.provider.PlanAction(providers.PlanActionRequest{\n\t\tActionType:         req.ActionType,\n\t\tProposedActionData: configVal,\n\t\tClientCapabilities: providers.ClientCapabilities{\n\t\t\tDeferralAllowed:            true,\n\t\t\tWriteOnlyAttributesAllowed: true,\n\t\t\tComputedBlocksAllowed:      true,\n\t\t},\n\t})","sourceCodeStart":837,"sourceCodeEnd":873,"githubUrl":"https://github.com/hashicorp/terraform/blob/d32a084675427f5ac3f7d2868578ef8b2c1dc525/internal/grpcwrap/provider.go#L837-L873","documentation":"Returned by the tfplugin5 PlanAction handler when the requested action type is absent from p.schema.Actions. Terraform core asked to plan an action the provider never declared, so the wrapper cannot find a config schema to decode the proposed action data.","triggerScenarios":"A PlanAction RPC whose req.ActionType is missing from p.schema.Actions; the map lookup returns ok=false.","commonSituations":"Provider version without action support or without this specific action; action type name typo in config; terraform core version that expects an action the running provider does not expose.","solutions":["Verify the action type spelling in configuration matches the provider.","Confirm via `terraform providers schema -json` that the provider advertises the action.","Upgrade the provider to a version declaring the action.","If developing the provider, register the action in schema.Actions."],"exampleFix":"// before\nproviderSchema.Actions = map[string]*config.Action{}\n// after\nproviderSchema.Actions = map[string]*config.Action{\n    \"example/delete\": exampleActionSchema,\n}","handlingStrategy":"validation","validationCode":"// Confirm the action is registered before planning it.\nschemas, err := client.GetProviderSchema(ctx, &tfplugin5.GetProviderSchema_Request{})\nif err != nil {\n    return err\n}\nif _, ok := schemas.Actions[actionType]; !ok {\n    return fmt.Errorf(\"will not plan action: %q not registered by provider\", actionType)\n}\nreturn client.PlanAction(ctx, actionType, config)","typeGuard":"func actionRegistered(s *tfplugin5.GetProviderSchema_Response, actionType string) bool {\n    _, ok := s.Actions[actionType]\n    return ok\n}","tryCatchPattern":null,"preventionTips":["Introspect schema.Actions before invoking PlanAction/InvokeAction.","Validate action type names against the live provider schema in CI."],"tags":["terraform","provider","schema","action","grpc","version-mismatch"],"backgroundTag":null,"analyzedSha":"d32a084675427f5ac3f7d2868578ef8b2c1dc525","analyzedAt":"2026-08-11T18:43:52.779Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}