Hi all, looking for any guidance if anyone's encou...
# general
s
Hi all, looking for any guidance if anyone's encountered needing an old
pulumi resource aws
version - but i can't install v3.30.1 since I'm on a new M1 mac, trying to take over a 1 year old deployment built with intel. is it possible to upgrade it to latest (~5.10.0) and still use the same state file on pulumi.com? I'm trying to avoid needing to manually import everything already deployed. is it possible to get the old stacks updated to the latest aws provider?
l
In theory, you could export the old stack, update the dependencies, and import it. But the risk of being affected by an incompatible API is very high given how far apart the versions are, so I wouldn't do this.
Just use a different computer. Maybe you could fire up a short-lived EC2 instance or similar in order to use the current code? Then once you've upped with updated dependencies, you can start working from your Mac.
s
"just use another computer" yeah is great but what a pain, i don't want to have a trail of different computers/ec2/images for old deploys. is there no way to bring a stack onto a newer aws provider? just not sure how to upgrade a dev env/stack to use a newer
pulumi:providers:aws
- even with access to the old intel stack and installing all the latest pulumi versions, the stack is still pinned to use
3_30_1
instead of latest
5_10_0
.
b
@square-ability-48831 you can start a docker container with the right arch:
Copy code
docker run --entrypoint bash --rm -it --platform linux/amd64 pulumi/pulumi
Then update the provider version in the stack
Copy code
npm update @pulumi/aws
You’ll need to run a successful deploy with the old and new version to update the provider version
Copy code
pulumi up
From then on, you can go back to your machine
just not sure how to upgrade a dev env/stack to use a newer pulumiprovidersaws - even with access to the old intel stack and installing all the latest pulumi versions, the stack is still pinned to use 3_30_1 instead of latest 5_10_0
Provider versions are pinned inside the state. We know this is painful, and have https://github.com/pulumi/pulumi/issues/9878 open to make it easier
s
thanks for the insight, guess i'll just go through the pain of destroying and recreating, glad i have the luxury for this project!
g
you can update aws provider without create/destroy
pulumi up --target 'urn:pulumi:STACK::iam::pulumi:providers:aws::MyNewProvider'
l
Wouldn't that require the current binaries to run? But they don't, because they're not built for the M1. At least, I thought that was the problem...
s
I would think you’d be able to use the older Intel binaries on the M1 (via Rosetta). Not the same, but I was accidentally running the Intel version of Go on my M1 for several months before I realized. 🤦🏻
b
I also made this mistake 😂