https://pulumi.com logo
#general
Title
# general
f

fresh-librarian-41835

08/02/2022, 5:01 PM
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

bored-oyster-3147

08/02/2022, 5:10 PM
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

fresh-librarian-41835

08/02/2022, 5:13 PM
The issue is specifically with the stack state and not the resources as they exist in GitHub (using the GitHub Provider)
b

bored-oyster-3147

08/02/2022, 5:14 PM
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

fresh-librarian-41835

08/02/2022, 5:15 PM
The resources objects in the stack state. the json file
From
pulumi refresh
b

bored-oyster-3147

08/02/2022, 5:15 PM
Ok I'm sorry I misunderstood. Are you certain the credentials you are running under have write permissions to that S3?
f

fresh-librarian-41835

08/02/2022, 5:17 PM
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

bored-oyster-3147

08/02/2022, 5:18 PM
Ok - in S3 are there separate ACLs for CREATING a blob versus UPDATING a blob?
f

fresh-librarian-41835

08/02/2022, 5:19 PM
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

bored-oyster-3147

08/02/2022, 5:20 PM
Maybe try the refresh with some really verbose logging and see if anything comes up?
f

fresh-librarian-41835

08/02/2022, 5:20 PM
yeah nothing. asked for all the Vs.
b

bored-oyster-3147

08/02/2022, 5:21 PM
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

fresh-librarian-41835

08/02/2022, 5:24 PM
Got it. thanks for the suggestion.
5 Views