how can i delete a protected resource?
# general
g
how can i delete a protected resource?
w
You have to first do an update that removes the protection bit. So it's a two step process.
g
what if i don’t have the code anymore which created the resource in the first place?
w
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
ok thanks for the clarification 🙂