Pulumi "failed to load plugin" in CI
Pulumi found a provider plugin binary but could not launch it. Unlike "no resource plugin found", the file exists; it fails to run because it is for the wrong platform, corrupted, or incompatible with the CLI.
What this error means
A Pulumi step fails with "error: failed to load plugin" or "could not read plugin ... : fork/exec ... : exec format error" during preview or update.
pulumi
error: failed to load plugin for aws provider:
fork/exec /root/.pulumi/plugins/resource-aws-v6.0.0/pulumi-resource-aws:
exec format errorCommon causes
A cached plugin built for another architecture
A plugin cache restored from an x86 runner onto an arm64 runner (or vice versa) contains a binary the current CPU cannot execute.
A corrupted or partial plugin download
A truncated plugin download leaves an unrunnable binary that fails to load.
How to fix it
Reinstall the plugin for this runner
- Remove the bad cached plugin.
- Reinstall the provider so a matching binary is fetched.
- Re-run the command.
Terminal
pulumi plugin rm resource aws --yes
pulumi plugin install resource aws v6.0.0Key the plugin cache by architecture
Include the runner OS and architecture in the cache key so x86 and arm64 plugins never mix.
.github/workflows/ci.yml
- uses: actions/cache@v4
with:
path: ~/.pulumi/plugins
key: pulumi-plugins-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/package-lock.json') }}How to prevent it
- Include OS and arch in the plugin cache key.
- Reinstall plugins after a failed or partial download.
- Keep the Pulumi CLI and provider versions compatible.
Related guides
Pulumi "no resource plugin ... found in the workspace" in CIFix Pulumi "error: no resource plugin X found in the workspace or on your $PATH" in CI - the provider plugin…
Pulumi "Running program ... failed" language runtime error in CIFix Pulumi "error: Running program ... failed with an unhandled exception" in CI - your program threw before…
Pulumi "pulumi: command not found" on the runner in CIFix "pulumi: command not found" in CI - the Pulumi CLI is not installed on the runner or not on PATH, usually…