echoing-dawn-86996
01/10/2021, 12:51 PMdelete_before_replace=True
is simply not working.
Here is how I do it:
compute.Instance(
f"{name}-{zone}",
# More instance config here
opts=ResourceOptions(delete_before_replace=True)
)
However, pulumi simply ignores it. Each time the resource changes (the name changes), it first creates the new resource, and then deletes the old one.
What am I missing here?gentle-diamond-70147
01/10/2021, 10:47 PMechoing-dawn-86996
01/11/2021, 9:39 AMrecreate_on_update
would have solved the issue for me, but there is no such thing. Should I perhaps open an issue with feature request instead?gentle-diamond-70147
01/12/2021, 4:44 PMdelete_before_replace
isn't being honored there. If there's some other property you can change that would cause the resource to be replaced (e.g. like zone
?), then delete_before_replace
should work in that case.
Alternatively, you could call pulumi up --target-replace ...
to replace the instance which should honor delete_before_replace
. Would that work for you?echoing-dawn-86996
01/14/2021, 8:53 AMrecreate_on_update
or some other workaround here..gentle-diamond-70147
01/14/2021, 11:49 PMechoing-dawn-86996
01/17/2021, 3:47 PM