hashicorp/terraform · critical
missing provider schema
Error message
missing provider schema
What it means
Thrown by the Terraform plugin v6 gRPC client (GRPCProvider.GetProviderSchema) when GetProviderSchema succeeded without diagnostics but the response `Provider` field is nil. Identical semantics to the v5 'missing provider schema' error: the provider must declare a top-level provider schema, and a nil one is a provider defect. The v6 path then continues to fetch resource identity schemas.
Solutions
- Upgrade or pin a compatible v6 provider version; run `terraform init -upgrade`.
- Clear the plugin cache (.terraform/providers) and re-init.
- If you maintain the provider, ensure the framework provider schema is declared and returned.
- Check provider logs for a crash during schema serving.
Example fix
# before: v6 provider returns nil schema # provider-side: declare schema in terraform-plugin-framework provider # user-side: $ terraform init -upgrade
Defensive patterns
Strategy: retry
Validate before calling
# shell: verify the v6 provider serves a schema $ terraform providers schema -json | jq '.provider_schemas'
Try / catch
# bash: clear cache and re-init on schema failure
if ! terraform init 2>err.log; then
if grep -q 'missing provider schema' err.log; then
rm -rf .terraform/providers && terraform init -upgrade
else cat err.log; exit 1; fi
fi Prevention
- Pin v6 providers to compatible versions in required_providers.
- Keep the plugin cache clean.
- Run terraform validate in CI.
- For provider authors, always return a non-nil provider schema from the framework.
When it happens
Trigger: A v6-protocol provider's GetProviderSchema handler returned Provider == nil with no error. Protocol-version mismatch, a mis-built v6 provider, or a provider crash yielding an empty response.
Common situations: Provider built against terraform-plugin-go/terraform-plugin-framework v6 that omits the provider schema. Corrupted plugin cache. Version skew between core and provider.
Related errors
- action schema not found for action
- identity schema not found for type
- list resource schema not found for type
- list resource schema not found for type
- missing provider schema
AI-assisted analysis of hashicorp/terraform@d32a084675 (2026-08-11).
Data as JSON: /api/errors/b99b44cef9f84437.
Report an issue: GitHub.
Appendix: source
Thrown at internal/plugin6/grpc_provider.go:146
// Note: this option is marked as EXPERIMENTAL in the grpc API. We keep
// this for compatibility, but recent providers all set the max message
// size much higher on the server side, which is the supported method for
// determining payload size.
const maxRecvSize = 64 << 20
protoResp, err := p.client.GetProviderSchema(p.ctx, new(proto6.GetProviderSchema_Request), grpc.MaxRecvMsgSizeCallOption{MaxRecvMsgSize: maxRecvSize})
if err != nil {
resp.Diagnostics = resp.Diagnostics.Append(grpcErr(err))
return resp
}
resp.Diagnostics = resp.Diagnostics.Append(convert.ProtoToDiagnostics(protoResp.Diagnostics))
if resp.Diagnostics.HasErrors() {
return resp
}
if protoResp.Provider == nil {
resp.Diagnostics = resp.Diagnostics.Append(errors.New("missing provider schema"))
return resp
}
identResp, err := p.client.GetResourceIdentitySchemas(p.ctx, new(proto6.GetResourceIdentitySchemas_Request))
if err != nil {
if status.Code(err) == codes.Unimplemented {
// We don't treat this as an error if older providers don't implement this method,
// so we create an empty map for identity schemas
identResp = &proto6.GetResourceIdentitySchemas_Response{
IdentitySchemas: map[string]*proto6.ResourceIdentitySchema{},
}
} else {
resp.Diagnostics = resp.Diagnostics.Append(grpcErr(err))
return resp
}
}
resp.Diagnostics = resp.Diagnostics.Append(convert.ProtoToDiagnostics(identResp.Diagnostics))View on GitHub (pinned to d32a084675)