02/24/2023, 9:36 AM
Hello, just checking if there is a similar tool in Pulumi like tfswitch? 👋 When you have projects using different versions of Pulumi and you are required to change those versions locally. It would be helpful to switch between versions freely.
Nevermind, it's possible to just use an alias or a function with the following command:
curl -fsSL <> | sh -s -- --version <version>


02/24/2023, 7:11 PM
Pulumi has two installable aspects. The API/SDK is the big bit, and it never needs to be switched: it's defined in your build environment. The CLI is usually installed either globally or into ~/.pulumi, and theoretically may need to be switched, if your build practices require it. Generally, everything in the CLI is backwards compatible, so you should be able to avoid switching, but if your standards or processes require it, then you have a few options.
To achieve this, I recommend running Pulumi via Docker (podman or similar works fine too). You need to set up some aliases to map versions to commands, but it should handle all cases.
Your solution works, but in theory, the version binary could change. Obviously it would very unlikely that Pulumi would change an old version after releasing it, but it is technically possible. Using Docker/OCI images has the advantage that you can download them once, then keep them in you local registry and know that they'll always be the exact version you used before.
BTW this question is best targeted at #general.