Hello, I’m working on a custom Terraform provider and I’m adding a “force_destroy” or “force_delete” flag (not sure which name I’ll use, the first feels a bit more idiomatic).
I have some resources that can only be deleted when this flag is set to true (defaults to false) however I’m not sure how to add an acceptance test to confirm that the destroys are in fact blocked and return an error. I don’t see a hook in the SDK to detect when a destroy runs and fails.
The CheckDestroy test check function only seems to work in the context of the destroy phase actually running to completion.
Any help is appreciated, thank you in advance.