Allow destroy to proceed for resources that are dependent on undeletable resources
Hello!
- Vote on this issue by adding a reaction
- If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)
Description
This is a follow-up issue to https://github.com/pulumi/pulumi/issues/3304. In that issue we implemented a --continue-on-error flag, that allows destroy to continue even if there are resources that failed to deleted. It will however not try to delete any resources that are depended on by undeletable resources, keeping the dependency chains intact, and leaving those resources to be managed by Pulumi.
However there is a case to be made for trying to clean up as much as possible, even if that breaks a dependency chain. Described in the above mentioned issues as:
It's possible this should even try to delete resources that are depended-on by undeletable resources - just in case it is possible (for example, if a Kubernetes resource fails to delete, we could try to proceed and delete the whole Kuberentes cluster).
For this we can implement a --force flag, that would mean "really try to destroy all resources no matter the dependency structure". It would also potentially leave more manual cleanup for the user to do.
Source: pulumi/pulumi