i’m trying to destroy resources in my stack, but i...
# general
e
i’m trying to destroy resources in my stack, but i get the error that I cant remove a protected resource. How can I bypass this and force delete? Or how can I get a list of all URNs that I can pass to the
--target
option of
pulumi destroy
?
w
The goal of protect is to ensure it is not easy to (accidentally) destroy the resource. You can remove the protect bit and then destroy it as two separate operations. https://www.pulumi.com/docs/reference/cli/pulumi_state_unprotect/ can help on the first step.
l
You need to do it in two steps. 1) Find all the resources with opt
protect: "true"
and remove that. Run
pulumi up
. 2) Run
pulumi destroy
b
also, for the list of all urns you can just do
pulumi stack -u