hey all quick question when im working with my te...
# typescript
r
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
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
doesnt the state get stored in the pulumi backend by default?
g
If using Pulumi Cloud then it should. Check from Pulumi Cloud UI
You can view state information there
As should your co-workers
r
im using pulumi cloudm,
do u happen to know where on the cloud its visible
g
But anyway, this is a state sync issue
Can't remember out of the blue and I'm on a bus commuting:)
r
ah no worries
thanks
ill look in to this
while i have you
have u deployed api gateway via pulumi?
g
AWS api gateway? No
r
ah okay
g
I've done Azure and GCP with Pulumi but not AWS. Only Terraform with AWS
r
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
Something wonky is going on
r
exactly
g
Try
pulumi refresh
r
i’ve opened tickets on pulumi,yet no reply
g
And see what it does
That command tries to update state by calling cloud vendor APIs to see what really is there
r
that typically refreshes the stack right
yeag
the issue is the problem gets solved on the second deployment of pulumni
g
Hmm
Sometimes cloud vendor APIs are just bad
r
hmm
and next big issue is
g
But can't say if it's the case here
r
when i run a code build deployment, it completely deploys the entire thing
and not only the diff
g
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
im on the pulmi console right now, i still didnt see something called state 😕
g
Here's the official docs on the concept
r
yes im reading that right now
thanks a bunhc
g
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
hmm
u manage your own state
?
g
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
oh yes
this is similar to custom backend on terraform isnt it
g
And this method doesn't provide transactional guarantees of Pulumi Cloud
Yes it is identical
r
hm okay
which do u recommend?
im currently running a production app
g
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
hm
interesting
g
In my case the problem is credit cards
r
yes thats true
im reading the link u said
they dont mention anything regarding this issue tbh
g
Like said, your issue is wonky :)
r
exactly 😕
also certain npm modules act werird too
g
Hard to say what exactly is going on remotely
r
for ex, i installed axios, this too triggers a full deployment each time
g
I guess Pulumi devs can help you better
r
shame no one is replying
g
It definitely sounds like a state sync issue
I guess the devs are out of office. Time zones
r
😕 for weeks?
g
No. But there's paid support and best effort support
r
🙂 ill check on that
g
Like with most tools
r
this was really helpful, now i can kinda find out where to look for to debug atleast
g
No problem. Spent part of my commute on a better way than watching cat vids from internet
r
lol 😄 safe travels