pulumi-azure: 'could not load plugin for azure provider' 'failed to locate compatible plugin'.
I had a strange issue this morning where I got the below error message when doing a pulumi preview
on our CI machine (Ubuntu). I ran the update locally instead on Win10 and it worked ok. Since then the update proceeds normally even on CI.
Refreshing state from deployed resources
Refreshing (development):
error: could not load plugin for azure provider 'urn:pulumi:goodfellow-development::goodfellow-development::pulumi:providers:azure::default': failed to locate compatible plugin
WARNING: Pulumi Preview failed.
We have a system set up to share state between CI and local updates so they were both operating against the same state files. Iβd done a pulumi refresh
on Win10 before submitting to CI.
The update coincided with pulumi version updates:
- "@pulumi/azure": "^0.16.9",
- "@pulumi/kubernetes": "~0.20.3",
- "@pulumi/pulumi": "^0.16.17",
+ "@pulumi/azure": "0.17.1",
+ "@pulumi/kubernetes": "0.21.0",
+ "@pulumi/pulumi": "0.17.1",
It seems as if doing a preview on Win10 had prevented the Linux plugin from recognising the provider somehow?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 16 (9 by maintainers)
Commits related to this issue
- Install missing plugins on startup This commit addresses the problem of missing plugins by scanning the snapshot and language host on startup for the list of required plugins and, if there are any pl... — committed to pulumi/pulumi by swgillespie 5 years ago
- Install missing plugins on startup (#2560) * Install missing plugins on startup This commit addresses the problem of missing plugins by scanning the snapshot and language host on startup for the ... — committed to pulumi/pulumi by swgillespie 5 years ago
- Install missing plugins on startup (#2560) * Install missing plugins on startup This commit addresses the problem of missing plugins by scanning the snapshot and language host on startup for the ... — committed to pulumi/pulumi-docker-containers by swgillespie 5 years ago
Also worth noting is that, although this bug masqueraded as an issue with our new plugin load behavior (and
PULUMI_ENABLE_LEGACY_PLUGIN_SEARCH
), this is actually not a new bug and both the old and new plugin loading behaviors are equally broken.This is fixed with https://github.com/pulumi/pulumi/pull/2560 which is part of the
0.17.2
release.Thanks to @adaniline-traderevβs example on slack (thank you!) I had a moment of inspiration and hereβs whatβs going on here and here is a set of repro steps.
@pulumi/pulumi
and@pulumi/aws
:pulumi plugin install
does not help:I believe this repro covers everyone thatβs posted about having issues in this thread. Step 11 and step 12 simulate being in CI environments, which is why I believe that everyone has seen this trouble in their CI environments while observing that they have no problems when run locally.
Workaround
If you are in this situation, you can run the command present in the error message and it will install the missing plugin:
Given that this most often happens in CI scenarios, a reasonable workaround for now would be to put this command in your CI script until Pulumi delivers a fix.
To anyone else having this issue:
You can set the environment variable
PULUMI_ENABLE_LEGACY_PLUGIN_SEARCH=1
to get unblocked and load plugins exactly as before.