-
Notifications
You must be signed in to change notification settings - Fork 107
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
Have a force_delete true/false on repositories similar to AWS ECR. #1069
Comments
@EricChen1248 Thanks for the suggestion. I think this is very good idea and I'll add this to our plan. |
@EricChen1248 I have a few questions:
While I think it is a good idea to perform additional checks before deleting a repository, and makes it explicit for users to delete existing repository, it is not as straightforward as just adding a new attribute and a conditional check. For example, to ensure backward compatibility, this attribute will need to be defaulted to |
Hi @alexhung |
@jgrumboe This is still in progress. The doc update must have slipped through into one of the recent PR. I'll fix the doc in next release. |
For an initial implementation, I see that making sense. Backwards compatibility is important. Perhaps to make it more useful, allowing it to be a provider level setting that can be overwritten per repo would make easing into it easier for people who want to use it.
In this case, repo1 can be deleted even if it's non empty, repo2 has no settings so it defaults to what's set in the provider. And then provider.artifactory.delete_non_empty_repo defaults to true if nothing is set. (Not sure if this is something doable or makes sense for Terraform, only coming at it from a user POV) |
Is your feature request related to a problem? Please describe.
Deleting a non empty repository is too easy and destructive.
If a misconfiguration or something is made that causes terraform to decide to delete a repo, and if there contents in the repositories, the contents are also deleted non reversibly.
Describe the solution you'd like
Have a setting similar to AWS's ECR to allow/disable "force delete"
I expect terraform apply/destroy to fail to delete a repo that has content in it unless explictly set to force delete.
Describe alternatives you've considered
No alternatives. Terraform is too dangerous for us to use with this behavior.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: