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

glamorous-printer-66548

10/03/2018, 11:19 PM
how can i delete a protected resource?
w

white-balloon-205

10/03/2018, 11:20 PM
You have to first do an update that removes the protection bit. So it's a two step process.
g

glamorous-printer-66548

10/03/2018, 11:21 PM
what if i don’t have the code anymore which created the resource in the first place?
w

white-balloon-205

10/03/2018, 11:26 PM
Then you would need to manually remove the bit with
pulumi stack export
/ remove protected bit /
pulumi stack import
prior to the destroy. It's more or less intentional that
protect
makes it hard to delete. But https://github.com/pulumi/pulumi/issues/1909 would help make the workaround a single command instead of the export/import dance.
g

glamorous-printer-66548

10/03/2018, 11:26 PM
ok thanks for the clarification 🙂
3 Views