https://pulumi.com logo
Title
m

millions-pharmacist-626

04/07/2023, 4:41 PM
So, i've set a resource with the option
deleteBeforeReplace
to
true
, but pulumi still tries to create the new one before deleting the old, and I get an error (see screenshot). What am I missing?
related code:
_trigger = glue.Trigger(
    _TRIGGER_NAME,
    _trigger_args,
    pulumi.ResourceOptions(delete_before_replace=True),
)
b

billowy-army-68599

04/07/2023, 4:43 PM
did you run a successful
up
on the resource yet? you need to set delete before replace in state before it’ll take effect
m

millions-pharmacist-626

04/07/2023, 5:58 PM
yeah, I had destroyed all the stack, added "delete_before_replace", and ran "up". Then changed the "Trigger_name" and tried to run "up" again.
b

billowy-army-68599

04/07/2023, 6:05 PM
and it isn’t replacing correctly? could you open an issue?
m

millions-pharmacist-626

04/07/2023, 6:06 PM
I'll try again immediately and record what's going on in real time.
actually wait a second
Ok no, my assumption failed. I believed if I set "replace_on_changes" to
*
I could make it work. I'll open an issue