pulumi/pulumi · error
--checksum is only valid if a specific package is being inst
Error message
--checksum is only valid if a specific package is being installed
What it means
Like --file, the `--checksum` flag is only meaningful when installing one specific plugin; in bulk (no-argument) mode there is no single artifact to verify, so the CLI returns this error when --checksum is set without plugin arguments.
Source
Thrown at pkg/cmd/pulumi/plugin/plugin_install.go:260
return err
}
pluginSpec = updatedSpec
}
} else if version == nil && pluginSpec.Version == nil {
// If we don't have a version try to look one up
latestVersion, err := cmd.pluginGetLatestVersion(pluginSpec, ctx)
if err != nil {
return err
}
pluginSpec.Version = latestVersion
}
installs = append(installs, pluginSpec)
} else {
if cmd.file != "" {
return errors.New("--file (-f) is only valid if a specific package is being installed")
}
if cmd.checksum != "" {
return errors.New("--checksum is only valid if a specific package is being installed")
}
// If a specific plugin wasn't given, compute the set of plugins the current project needs.
plugins, err := getProjectPlugins(ctx)
if err != nil {
return err
}
for _, plugin := range plugins {
// TODO[pulumi/pulumi#956]: eventually we will want to honor and
// install all plugins in the usual way.
if !workspace.IsPluginBundled(plugin.Kind, plugin.Name) {
installs = append(installs, plugin)
}
}
}
// Now for each kind, name, version pair, download it from the release website, and install it.
bars := progress.NewGroup(cmd.stderr)View on GitHub (pinned to 793f7b2e16)
Solutions
- Name the specific plugin along with --checksum: pulumi plugin install resource <name> <version> --checksum <hex>
- If you want to install all project plugins, remove the --checksum flag
- To verify every project plugin, rely on the checksums recorded in the project's package specs instead
Example fix
// before $ pulumi plugin install --checksum abc123... // after $ pulumi plugin install resource myprovider 1.2.3 --checksum abc123...
Defensive patterns
Strategy: validation
Validate before calling
if (useChecksumFlag && !explicitPluginArgs) {
throw new Error('--checksum requires an explicit plugin: pulumi plugin install <kind> <name> <version> --checksum <hex>');
} Prevention
- Only pass --checksum together with kind/name/version args
- Rely on project package-spec checksums for bulk installs instead of a single --checksum value
When it happens
Trigger: Running `pulumi plugin install --checksum <hexdigest>` (or `pulumi plugin install --checksum ... ` with no kind/name args) to install all project plugins.
Common situations: Adding --checksum to a shared install script that installs all project plugins; copy-pasting a single-plugin checksum command into a bulk install context.
Related errors
- missing plugin version argument, this is required if install
- cannot specify both "@%s" and "%s" as a version
- --file (-f) is only valid if a specific package is being ins
- no environment name specified
- the provider command does not accept versions
AI-assisted analysis of pulumi/pulumi@793f7b2e16 (2026-08-31).
Data as JSON: /api/errors/5df82854443bcb17.
Report an issue: GitHub.