Is anyone aware of a way to make pulumi always rep...
# general
b
Is anyone aware of a way to make pulumi always replace a given resource in your stack. In my case a Digital Ocean droplet, I don't ever want an update in place.
s
you can force this by giving the resource a name that depends on something like the unix time
b
oh ok the name is immutable forces a replacement eh?
s
yup! by "name" I mean Pulumi resource name, which is the first parameter to a resource class instantiation
b
👍 perfect thanks @colossal-australia-65039
p 1
b
I wonder if setting
delete before replace
will also do it, but have never tried.
s
That setting applies to resources that are going to be replaced and forces that the resource is deleted before trying to create the new one. But it won't cause the resource to be replaced if there are no changes to it
b
I understood the above desire to be “if you need to do an update, do a replace rather than an in-place update”, not a “replace this resource every time you run
pulumi up
b
because user-data only runs on spin up. If I push something new that impacts that I want it to be reflected (ie: a new container instance, an env var value etc.)
Sadly there seems to be other issues that block this approach from working without a full teardown