-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Protection against accidental Cluster deletion #79
Comments
Thanks for creating an issue @patrickherrera! That's a great observation! Did you consider using prevent_destroy lifecycle attribute? Let me know if it helps! |
Thanks, unfortunately that only prevents destructive changes to a resource, which I hope would never apply to a Cluster anyway. It won't prevent issues where the resource is accidentally removed from the source or some other silly developer error, since the |
Do you mean scenarios where a resource definition is commented out / removed from TF configuration file? |
Correct. Or even potentially renamed and Terraform thinks it should destroy/recreate. |
@patrickherrera just to follow up, thanks again for the suggestion! Looks like TF Provider for GCP uses I wonder what's your opinion about the default value, make it
or default to |
In a way it is a breaking change so I'm not sure if you have a particular policy for that for your module. I think it is fine to default to |
@patrickherrera that makes sense to me, thanks! Yeah I think if we default Are there any other existing resources (except I'm thinking about |
Good question. If it defaults to |
btw as a follow up, we investigated the specific use case of a possible recreation (destroy/create) (when updating an attribute that has got It seems like the use case for using |
Renaming the Resource will also cause it to be deleted and recreated, and I have just confirmed that
|
update: as a quick attempt to mitigate an issue, we added a note about using |
APIT-2642 - Add Environment field as required for all flink UDF commands
Any chance you could add a flag to enable "delete_protection", and as long as that is
true
, the Cluster cannot be deleted. I feel it is too easy to make a mistake and have Terraform blow away your Cluster - this would at least make it a two-step process and unlikely to happen accidentally.I'm thinking a similar pattern to that used by AWS RDS Databases (taken from the AWS TF Provider docs):
The text was updated successfully, but these errors were encountered: