Plans should generate an error when they show deletion of a resource that has deletion protection enabled #20729
Labels
enhancement
mmv1-generator
Provider-wide changes to resource templates or other generator changes
service/terraform
size/m
Milestone
Community Note
Description
There are a ton of resources with some kind of deletion protection arguments. Right now, no error is raised when making a plan to delete a resource with deletion protection enabled. Deletion protection only raises an error during the apply.
This creates a poor user experience where:
A marginal improvement to this flow based on current behavior would be
A much better user experience would be:
Based on the conversation in hashicorp/terraform#36229 (comment), it appears that the provider should be able to implement these improved workflows.
While I think that this behavior should change globally, if there are objections to plans failing because of deletion protection it could potentially be governed by a setting on the provider itself. But in my opinion, that complexity doesn't make a lot of sense because I don't know why someone would want to deliberately have failed applies.
New or Affected Resource(s)
Potential Terraform Configuration
N/A, no configuration changes required
References
The text was updated successfully, but these errors were encountered: