Is there a way to skip pulumi from running `pulumi...
# python
g
Is there a way to skip pulumi from running
pulumi plugin install
when installing Pip/python pulumi libraries out of band? (e.g. we're using Pipfile). For context here, in this instance, pulumi is being managed via the asdf tool, but the global version is not set (on purpose) so we can rely on the
.tool-versions
file. This means when pulumi is invoked from the cwd of the project's original
Pulumi.yaml
file this is not a problem, but when pipenv goes to install it uses a tmp directory which does not contain the
.tool-versions
file. I'd rather install these plugins via
pulumi plugin install
instead, if possible.
Copy code
[pipenv.exceptions.InstallError]:         File "/tmp/pip-install-qcukotzg/pulumi-aws_d0831f623f8341148f9146396ab524dc/setup.py", line 18, in run
[pipenv.exceptions.InstallError]:           check_call(['pulumi', 'plugin', 'install', 'resource', 'aws', PLUGIN_VERSION])
[pipenv.exceptions.InstallError]:         File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
[pipenv.exceptions.InstallError]:           raise CalledProcessError(retcode, cmd)
[pipenv.exceptions.InstallError]:       subprocess.CalledProcessError: Command '['pulumi', 'plugin', 'install', 'resource', 'aws', '5.32.0']' returned non-zero exit status 126.
[pipenv.exceptions.InstallError]:       [end of output]
[pipenv.exceptions.InstallError]:
TIL asdf supports a
ASDF_<tool>_VERSION
env var - I was able to set
ASDF_PULUMI_VERSION
prior to running pipenv sync and it works just fine.
Copy code
export ASDF_PULUMI_VERSION=$(asdf current pulumi | awk '{print $2}')