https://pulumi.com logo
Title
r

rough-jordan-15935

11/24/2022, 4:59 AM
hey all quick question when im working with my team and we each do a pulumi deployment, why does the next user who deploys have to redeploy the entire stack and not only the diff?
g

gorgeous-country-43026

11/24/2022, 6:21 AM
Sounds like you are using local state. In any case this happens if Pulumi doesn't find state data since it compares that to the definitions in code and based on that decides what needs to change
If one uses local state then this data is only on your local computer
r

rough-jordan-15935

11/24/2022, 6:21 AM
doesnt the state get stored in the pulumi backend by default?
g

gorgeous-country-43026

11/24/2022, 6:22 AM
If using Pulumi Cloud then it should. Check from Pulumi Cloud UI
You can view state information there
As should your co-workers
r

rough-jordan-15935

11/24/2022, 6:22 AM
im using pulumi cloudm,
do u happen to know where on the cloud its visible
g

gorgeous-country-43026

11/24/2022, 6:23 AM
But anyway, this is a state sync issue
Can't remember out of the blue and I'm on a bus commuting:)
r

rough-jordan-15935

11/24/2022, 6:23 AM
ah no worries
thanks
ill look in to this
while i have you
have u deployed api gateway via pulumi?
g

gorgeous-country-43026

11/24/2022, 6:24 AM
AWS api gateway? No
r

rough-jordan-15935

11/24/2022, 6:24 AM
ah okay
g

gorgeous-country-43026

11/24/2022, 6:24 AM
I've done Azure and GCP with Pulumi but not AWS. Only Terraform with AWS
r

rough-jordan-15935

11/24/2022, 6:24 AM
whenever i introduce a new api gateway resource on pulumi, i get errors like
enexpected token e
it needs two deployments to resolve the error
this totally disrupts zero downtime as sometimes im having 40 mins downtime because code build deploys entire app and not diff too
g

gorgeous-country-43026

11/24/2022, 6:25 AM
Something wonky is going on
r

rough-jordan-15935

11/24/2022, 6:25 AM
exactly
g

gorgeous-country-43026

11/24/2022, 6:26 AM
Try
pulumi refresh
r

rough-jordan-15935

11/24/2022, 6:26 AM
i’ve opened tickets on pulumi,yet no reply
g

gorgeous-country-43026

11/24/2022, 6:26 AM
And see what it does
That command tries to update state by calling cloud vendor APIs to see what really is there
r

rough-jordan-15935

11/24/2022, 6:26 AM
that typically refreshes the stack right
yeag
the issue is the problem gets solved on the second deployment of pulumni
g

gorgeous-country-43026

11/24/2022, 6:27 AM
Hmm
Sometimes cloud vendor APIs are just bad
r

rough-jordan-15935

11/24/2022, 6:28 AM
hmm
and next big issue is
g

gorgeous-country-43026

11/24/2022, 6:28 AM
But can't say if it's the case here
r

rough-jordan-15935

11/24/2022, 6:28 AM
when i run a code build deployment, it completely deploys the entire thing
and not only the diff
g

gorgeous-country-43026

11/24/2022, 6:28 AM
These issues are related
And are originating from problems with state
Pulumi decides what to deploy based on the diff it calculates from state and if that state is empty then it deploys everything
r

rough-jordan-15935

11/24/2022, 6:30 AM
im on the pulmi console right now, i still didnt see something called state 😕
g

gorgeous-country-43026

11/24/2022, 6:30 AM
Here's the official docs on the concept
r

rough-jordan-15935

11/24/2022, 6:31 AM
yes im reading that right now
thanks a bunhc
g

gorgeous-country-43026

11/24/2022, 6:32 AM
I've usually used a non pulumi cloud backend since that way I don't have to start go over fighting with the money people
r

rough-jordan-15935

11/24/2022, 6:32 AM
hmm
u manage your own state
?
g

gorgeous-country-43026

11/24/2022, 6:32 AM
But Pulumi Cloud does make everything simpler
In Azure used Blob Storage and on GCP using Cloud Storage. In AWS would use S3
Basically one has to create a bucket for state outside pulumi
r

rough-jordan-15935

11/24/2022, 6:33 AM
oh yes
this is similar to custom backend on terraform isnt it
g

gorgeous-country-43026

11/24/2022, 6:33 AM
And this method doesn't provide transactional guarantees of Pulumi Cloud
Yes it is identical
r

rough-jordan-15935

11/24/2022, 6:34 AM
hm okay
which do u recommend?
im currently running a production app
g

gorgeous-country-43026

11/24/2022, 6:34 AM
If money isn't an issue I'd use Pulumi Cloud
It makes your life easier and you also support Pulumi development that way
And you can move out if the money becomes an issue. Export stacks, change backend, import stacks
It's actually pretty simple
r

rough-jordan-15935

11/24/2022, 6:36 AM
hm
interesting
g

gorgeous-country-43026

11/24/2022, 6:36 AM
In my case the problem is credit cards
r

rough-jordan-15935

11/24/2022, 6:37 AM
yes thats true
im reading the link u said
they dont mention anything regarding this issue tbh
g

gorgeous-country-43026

11/24/2022, 6:37 AM
Like said, your issue is wonky :)
r

rough-jordan-15935

11/24/2022, 6:37 AM
exactly 😕
also certain npm modules act werird too
g

gorgeous-country-43026

11/24/2022, 6:38 AM
Hard to say what exactly is going on remotely
r

rough-jordan-15935

11/24/2022, 6:38 AM
for ex, i installed axios, this too triggers a full deployment each time
g

gorgeous-country-43026

11/24/2022, 6:38 AM
I guess Pulumi devs can help you better
r

rough-jordan-15935

11/24/2022, 6:38 AM
shame no one is replying
g

gorgeous-country-43026

11/24/2022, 6:38 AM
It definitely sounds like a state sync issue
I guess the devs are out of office. Time zones
r

rough-jordan-15935

11/24/2022, 6:39 AM
😕 for weeks?
g

gorgeous-country-43026

11/24/2022, 6:39 AM
No. But there's paid support and best effort support
r

rough-jordan-15935

11/24/2022, 6:39 AM
🙂 ill check on that
g

gorgeous-country-43026

11/24/2022, 6:39 AM
Like with most tools
r

rough-jordan-15935

11/24/2022, 6:40 AM
this was really helpful, now i can kinda find out where to look for to debug atleast
g

gorgeous-country-43026

11/24/2022, 6:40 AM
No problem. Spent part of my commute on a better way than watching cat vids from internet
r

rough-jordan-15935

11/24/2022, 6:41 AM
lol 😄 safe travels