pulumi/pulumi · error
load provider: %w
Error message
load provider: %w
What it means
pluginFromSource loads the provider plugin named by the first package argument (e.g. "terraform-provider@5.0.0"). Failure typically means the plugin binary is not installed, cannot be downloaded, or crashed during startup; the error is wrapped as "load provider".
Source
Thrown at pkg/cmd/pulumi/do/do.go:200
host, err := newHost(ctx, diagFwd, statusFwd)
if err != nil {
return nil, nil, fmt.Errorf("create plugin host: %w", err)
}
pctx, err := plugin.NewContext(
ctx, diagFwd, statusFwd, host, nil, wd, nil, false,
nil)
if err != nil {
contract.IgnoreClose(host)
return nil, nil, fmt.Errorf("create plugin context: %w", err)
}
p, err := pluginFromSource(ctx, pctx, wd, pkgargs[0])
if err != nil {
// Close the plugin context we opened above since we're not returning it to the caller.
contract.IgnoreClose(pctx)
contract.IgnoreClose(host)
return nil, nil, fmt.Errorf("load provider: %w", err)
}
cleanup := func() {
contract.IgnoreClose(p)
contract.IgnoreClose(pctx)
// host is owned here, closed after the context
contract.IgnoreClose(host)
}
// Parse "name@version" out of pkgargs[0] so we can also describe the package to downstream consumers
// (such as snippet converters) in the form the codegen loader expects.
pkgName := pkgargs[0]
var pkgVersion string
if at := strings.Index(pkgName, "@"); at != -1 {
pkgVersion = pkgName[at+1:]
pkgName = pkgName[:at]
}
packageDescriptor := &codegenrpc.GetSchemaRequest{
Package: pkgName,View on GitHub (pinned to 793f7b2e16)
Solutions
- Install the plugin explicitly: `pulumi plugin install resource <name> <version>`.
- Check network access to the plugin registry (or configure an offline mirror).
- Verify the package name spelling in --package / the token.
- Remove the cached plugin and reinstall: `pulumi plugin rm <name>` then retry.
Example fix
// before pulumi do --package terraform-provider // not installed // after pulumi plugin install resource terraform-provider 5.0.0 pulumi do --package terraform-provider@5.0.0
Defensive patterns
Strategy: validation
Validate before calling
pulumi plugin ls | grep -q "$provider" || pulumi plugin install resource "$provider" "$version"
Try / catch
p, err := pluginFromSource(ctx, pctx, wd, pkgName)
if err != nil {
contract.IgnoreClose(pctx)
contract.IgnoreClose(host)
return nil, fmt.Errorf("load provider: %w", err)
} Prevention
- Pre-install required provider plugins before running `pulumi do` in CI.
- Pin plugin versions explicitly (name@version) instead of relying on latest.
- Verify network access to the plugin registry in air-gapped environments.
When it happens
Trigger: Running `pulumi do --package <name>` where the provider plugin is not installed (`pulumi plugin ls` lacks it), the download from pulumi.com fails, or the provider binary exits during GetSchema handshake.
Common situations: Offline/air-gapped environment blocking plugin download; wrong plugin name/typo; incompatible plugin version for the current CLI; corrupt plugin binary in the cache.
Related errors
- could not run plugin at %q: %w
- starting gRPC server: %w
- failed to validate provider config: %w
- parameterize provider for extension component: %w
- could not dial plugin [%v] over RPC: %w
AI-assisted analysis of pulumi/pulumi@793f7b2e16 (2026-08-31).
Data as JSON: /api/errors/c0f366cbee98848e.
Report an issue: GitHub.