hashicorp/terraform · error
${resp.Error}
Error message
${resp.Error} What it means
Thrown by GRPCProvider.Stop() (plugin v6) when the StopProvider RPC returned no transport error but set a non-empty `Error` string. v6 renames the RPC to StopProvider but the behavior matches v5: the provider reports it could not cleanly shut down during `terraform destroy`/interrupt, and the raw string is wrapped in errors.New.
Source
Thrown at internal/plugin6/grpc_provider.go:540
protoResp, err := p.client.ConfigureProvider(p.ctx, protoReq)
if err != nil {
resp.Diagnostics = resp.Diagnostics.Append(grpcErr(err))
return resp
}
resp.Diagnostics = resp.Diagnostics.Append(convert.ProtoToDiagnostics(protoResp.Diagnostics))
return resp
}
func (p *GRPCProvider) Stop() error {
logger.Trace("GRPCProvider.v6: Stop")
resp, err := p.client.StopProvider(p.ctx, new(proto6.StopProvider_Request))
if err != nil {
return err
}
if resp.Error != "" {
return errors.New(resp.Error)
}
return nil
}
func (p *GRPCProvider) ReadResource(r providers.ReadResourceRequest) (resp providers.ReadResourceResponse) {
logger.Trace("GRPCProvider.v6: ReadResource")
schema := p.GetProviderSchema()
if schema.Diagnostics.HasErrors() {
resp.Diagnostics = schema.Diagnostics
return resp
}
resSchema, ok := schema.ResourceTypes[r.TypeName]
if !ok {
resp.Diagnostics = resp.Diagnostics.Append(fmt.Errorf("unknown resource type %s", r.TypeName))
return resp
}View on GitHub (pinned to d32a084675)
Solutions
- Allow external processes to exit, then re-run the operation.
- Upgrade the v6 provider — stop-handling fixes ship in point releases.
- Inspect the provider-reported message (passed through verbatim) to identify the affected resource.
Example fix
# before $ terraform destroy # interrupted -> v6 provider stop error # after $ terraform destroy # after cleanup
Defensive patterns
Strategy: retry
Try / catch
# Go caller: treat v6 StopProvider errors as best-effort
if err := provider.Stop(); err != nil {
log.Printf("warn: v6 provider stop: %v", err)
} Prevention
- Treat StopProvider errors as non-fatal during teardown.
- Avoid interrupting destroys mid-flight.
- Keep the v6 provider current.
When it happens
Trigger: Running destroy or interrupting an apply that triggers the v6 provider's StopProvider, and the provider reports a stop failure.
Common situations: A v6 provider supervising external processes failing graceful shutdown. Interrupting a destroy midway.
Related errors
- ${resp.Error}
- missing provider schema
- ${protoResp.Error.Text}
- missing provider schema
- ${protoResp.Error.Text}
AI-assisted analysis of hashicorp/terraform@d32a084675 (2026-08-11).
Data as JSON: /api/errors/4eb0a4ac76fb2839.
Report an issue: GitHub.