Can someone help with `pulumi refresh` ? I am tryi...
# general
f
Can someone help with
pulumi refresh
? I am trying to refresh some objects in the stack state (Which takes about 7 mins to run) and pulumi CLI indicates it updated the resources but the File in the S3 backend is not updated. Rerunning
pulumi refresh
shows it wants to perform the same updates. Tried this on 2 different Macbooks (Intel and M1)
b
A
pulumi refresh
does not make any changes to your cloud resources. It corrects cloud resource drift. It re-syncs your pulumi state with your resources in reality. A
pulumi up
without the
--refresh
flag does not do this, it will make cloud resource changes by assuming that your current pulumi state is still an accurate reflection of reality. To clarify, a `pulumi up`: • Creates a resource graph of your desired state configuration • Compares it with your pulumi state • Makes changes to your resources to correct the difference between your DSC and your pulumi state A `pulumi refresh`: • Queries for each resource that currently exists in your pulumi state • Makes changes to your pulumi state to correct the difference between your pulumi state and reality
f
The issue is specifically with the stack state and not the resources as they exist in GitHub (using the GitHub Provider)
b
CLI indicates it updated the resources but the File in the S3 backend is not updated
You are expecting it to update resources, or no?
f
The resources objects in the stack state. the json file
From
pulumi refresh
b
Ok I'm sorry I misunderstood. Are you certain the credentials you are running under have write permissions to that S3?
f
creds and connectivity are all valid. When running a refresh on your stack using S3 backend, it takes a backup of your state
.bak
file. That gets created every time for every refresh i have tried, but the main state file is never updated.
b
Ok - in S3 are there separate ACLs for CREATING a blob versus UPDATING a blob?
f
thanks for helping. I am pretty well versed in Pulumi, but this is the first time using the S3 backend vs Pulumi Service. Never had this problem with Pulumi Service. Also, I have ran several other refreshes before this and they all worked fine.
Still not ruling out some weird connectivity thing with our Corp Security shenanigans. Just wanted to check here first in case it was something obvious i missed.
b
Maybe try the refresh with some really verbose logging and see if anything comes up?
f
yeah nothing. asked for all the Vs.
b
You could copy your state down into a local directory and try doing the refresh with a local filestate backend, to try to rule out S3/network errors
All of the blob storage backends are functionally equivalent to the filestate backend
f
Got it. thanks for the suggestion.