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

busy-honey-73811

06/16/2021, 2:23 PM
Is there a way to tell Pulumi to skip deleting some resources during destroy? I am looking for something like a “retention policy”, to tell Pulumi whether it should delete or retain (ignore) a resource on destroy.
b

brave-planet-10645

06/16/2021, 3:18 PM
You can use the
--target
to specify which resources you want to destroy. You can't say "destroy everything except these resources"
s

steep-toddler-94095

06/16/2021, 4:12 PM
Another workaround is removing the resource from Pulumi state, running pulumi destroy, and importing that resource back into state
b

bored-table-20691

06/16/2021, 4:12 PM
If I had to do this I’d do what Mike said
b

busy-honey-73811

06/16/2021, 6:00 PM
OK, thanks. So basically the answer is no 🙂.
b

bored-table-20691

06/16/2021, 6:05 PM
That was my surmising as well 🙂
3 Views