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

hallowed-australia-10473

12/03/2022, 11:03 PM
Is there a clever way to determine why Pulumi might want to replace an object when re-running
pulumi up
?
i

icy-controller-6092

12/04/2022, 12:12 AM
There is a way to produce a diff when running up, let me check
h

hallowed-australia-10473

12/04/2022, 12:13 AM
pulumi up --diff
provides some detail but doesn’t make it clear why something is being replaced.
and it doesn’t work if the thing Pulumi wants to replace is protected from deletion and it’s a replace-on-change thing
i

icy-controller-6092

12/04/2022, 12:14 AM
ah that’s the command I was looking for, then you need to find which part of the diff is causing the replacement. If it’s a genuine diff and the property requires the resource to be replaced, there’s no way around it unfortunately
h

hallowed-australia-10473

12/04/2022, 12:14 AM
Right, I just couldn’t tell why the resource was required to be replaced.
i

icy-controller-6092

12/04/2022, 12:14 AM
you’re right I can’t see it in the pulumi docs, but it may be more visible in the terraform provider docs
h

hallowed-australia-10473

12/04/2022, 12:14 AM
I think you’re right
i

icy-controller-6092

12/04/2022, 12:15 AM
wow, not in the terraform docs iether
h

hallowed-australia-10473

12/04/2022, 12:15 AM
HuH!
i

icy-controller-6092

12/04/2022, 12:16 AM
h

hallowed-australia-10473

12/04/2022, 12:16 AM
This is for a Digitalocean Spaces bucket so the S3 docs may be helpful
i

icy-controller-6092

12/04/2022, 12:16 AM
this page calls out which properties will cause a replacement if you look for “_Update requires_: Replacement
m

many-telephone-49025

12/04/2022, 1:30 PM
Hi Jack, on the registry site you can check for every property if it would trigger a recreation of the resource!