Hi :wave: , does anyone know how pulumi figures ou...
# python
Hi 👋 , does anyone know how pulumi figures out which plugin version to install? I started with a fresh installation of pulumi (cleaned the
dir and reinstalled) and then tried to run my project but the wrong plugin versions are being installed when I bring up my project:
Copy code
❯ poetry run pulumi up
Previewing update (prod):
[resource plugin kubernetes-2.4.0] installing
Downloading plugin: 23.95 MiB / 23.95 MiB [=========================] 100.00% 1s
Moving plugin... done.

error: could not load plugin for aws provider 'urn:pulumi:prod::new-data::pulumi:providers:aws::aws-east': no resource plugin 'aws' found in the workspace or on your $PATH
the aws plugin is not installed and the kubernetes version in my project is 2.4.3 but 2.4.0 plugin is being installed. I can workaround by manually installing the plugins but it is a bit inconvenient
The plugins are installed as part of installing the Python packages. So when you run
pip install pulumi-aws
, it runs `pulumi plugin install resource aws <version>`: https://github.com/pulumi/pulumi-aws/blob/5f6f8530bb8881ac88eed302c22299018aa39e81/sdk/python/setup.py#L11-L26 Before running an update, the engine will attempt to avoid missing plugins by scanning the most recent prior update’s snapshot to determine what plugin versions were used, and then install those plugins before running the update. (I am guessing this is why it is installing 2.4.0 rather than 2.4.3.) The engine also asks the language host for required plugins, and it will install those, but it’s a best effort as not all of the language hosts implement this, which is the case for Python. Luckily, we’re planning to address this soon: https://github.com/pulumi/pulumi/issues/4848
I see thanks for the info. I never had any issues before but the pulumi-aws plugin updated to the next version and started throwing this: https://github.com/pulumi/pulumi-aws/issues/1075. Trying to figure out a way to pin the version
nvm found it
Copy code
raw_aws_config = Config('aws')
aws_provider = AwsProvider(