hashicorp/terraform · error
${protoResp.Error}
Error message
${protoResp.Error} What it means
Thrown by GRPCProvisioner.Stop() (plugin v5 provisioner) when the Stop RPC returned no transport error but set a non-empty `Error` string. Mirrors the provider Stop path: a provisioner reports it could not cleanly interrupt/stop its operation during shutdown, and the raw message is wrapped in errors.New.
Source
Thrown at internal/plugin/grpc_provisioner.go:166
break
}
if len(rcv.Diagnostics) > 0 {
resp.Diagnostics = resp.Diagnostics.Append(convert.ProtoToDiagnostics(rcv.Diagnostics))
break
}
}
return resp
}
func (p *GRPCProvisioner) Stop() error {
protoResp, err := p.client.Stop(p.ctx, &proto.Stop_Request{})
if err != nil {
return err
}
if protoResp.Error != "" {
return errors.New(protoResp.Error)
}
return nil
}
func (p *GRPCProvisioner) Close() error {
// check this since it's not automatically inserted during plugin creation
if p.PluginClient == nil {
logger.Debug("provisioner has no plugin.Client")
return nil
}
p.PluginClient.Kill()
return nil
}
View on GitHub (pinned to d32a084675)
Solutions
- Let the provisioner's process finish or be cleaned up externally, then re-run.
- Avoid interrupting provisioners mid-execution; design resources to be idempotent.
- Migrate off provisioners to managed resources where possible.
Example fix
# before $ terraform apply # Ctrl-C during provisioner -> stop error # after # clean up the external process, then $ terraform apply
Defensive patterns
Strategy: retry
Try / catch
# Go caller: log provisioner stop errors as warnings
if err := prov.Stop(); err != nil {
log.Printf("warn: provisioner stop: %v", err)
} Prevention
- Avoid interrupting provisioners mid-execution.
- Make provisioned actions idempotent so re-runs are safe.
- Migrate off provisioners to managed resources.
When it happens
Trigger: Interrupting an apply/destroy while a provisioner is mid-execution, and the provisioner's stop handler reports a failure.
Common situations: A long-running local-exec or remote-exec provisioner killed mid-flight. A custom provisioner whose stop handler is buggy.
Related errors
AI-assisted analysis of hashicorp/terraform@d32a084675 (2026-08-11).
Data as JSON: /api/errors/d6da8de13970b763.
Report an issue: GitHub.