How does Pulumi determine which plugin version to ...
# general
How does Pulumi determine which plugin version to use? I assumed it would be the version in
Copy code
But that doesn’t seem to be the case for
Pulumi version used: v3.43.1
Copy code
$ pulumi up
Previewing update (sitka/uat)

View Live: <>

error: could not load plugin for aws-native provider 'urn:pulumi:uat::env-app::pulumi:providers:aws-native::default': Could not automatically download and install resource plugin 'pulumi-resource-aws-native'at version v0.22.1-alpha.1661750811, install the plugin using `pulumi plugin install resource aws-native v0.22.1-alpha.1661750811`.
Underlying error: error downloading plugin aws-native to file: failed to download plugin: aws-native-0.22.1-alpha.1661750811: 403 HTTP error fetching plugin from <>
I have
Copy code
$ pulumi plugin ls | grep 'NAME\|aws-native'
NAME        KIND      VERSION                           SIZE    INSTALLED     LAST USED
aws-native  resource  0.41.0                            92 MB   2 hours ago   30 minutes ago
aws-native  resource  0.39.0                            92 MB   3 weeks ago   3 weeks ago
aws-native  resource  0.29.0                            84 MB   2 months ago  2 months ago
aws-native  resource  0.19.1-alpha.1660828085+dfb123ac  86 MB   3 months ago  3 months ago
aws-native  resource  0.19.1-alpha.1660126749+9e28f183  84 MB   3 months ago  3 months ago
aws-native  resource  0.19.1-alpha.1659013975+9c6f4698  84 MB   3 months ago  3 months ago
aws-native  resource  0.19.1-alpha.1656019149+c2daf7c7  87 MB   4 months ago  4 months ago
aws-native  resource  0.19.0                            87 MB   4 months ago  2 months ago
Why is pulumi attempting to use
, which no longer exists, locally or on
Copy code
$ pulumi about                                                                                                                                                                                                                                        
Version      3.46.1
Go Version   go1.19.2
Go Compiler  gc

aws         5.21.0
aws-native  0.41.0
awsx        1.0.0-beta.11
docker      3.6.0
python      unknown

OS       darwin
Version  13.0
Arch     x86_64
oh… I guess it’s in state, fixed:
Copy code
pulumi state delete urn:pulumi:uat::env-app::pulumi:providers:aws-native::default
My theory is that old resources that don't get redeployed continue to refer to the older plugins, at least in the state file. Once every resource (that was deployed with version X) is updated using any newer version of the plugin, then Pulumi will drop the reference to version X. This is based only on my own non-empirical observations of state files.
I just ran into this again, this time with a newer version of the plugin that has gone missing,
With CICD, this will cause intermittent failures. Is it a good idea to start CICD runs by first removing the provider every run?
There should be now (since 1h) a 0.42.0 version
I check with engineering, why this happens