jfrog / terraform-provider-artifactory

Terraform provider to manage JFrog Artifactory
https://jfrog.com/artifactory
Apache License 2.0
273 stars 107 forks source link

Send deleted repository resources to Artifactory trash when destroying #1094

Open pshutt97 opened 1 week ago

pshutt97 commented 1 week ago

Is your feature request related to a problem? Please describe. When running the destroy command or any command that affects the presence of resources not within the STATEFILE, the resource is immediately wiped from storage and the database. It's also not sent to the trash like other deletion processes currently do in Artifactory. This can cause possible irrecoverable data loss due to an incorrect command that is run.

Describe the solution you'd like It would be ideal to mitigate possible impactful data loss by sending destroyed repository resources to the trash, along with their artifacts, instead of being completely wiped from the application. This way, in case of an accident with running Terraform, data can be restored if necessary.

alexhung commented 1 week ago

@pshutt97 Thanks for the suggestion. The current Artifactory API for repository deletion does not support moving repository to Trash.

I'll make a feature request internally to the Artifactory team. I encourage you to also do the same with your JFrog customer support contact.

pshutt97 commented 1 week ago

@pshutt97 Thanks for the suggestion. The current Artifactory API for repository deletion does not support moving repository to Trash.

I'll make a feature request internally to the Artifactory team. I encourage you to also do the same with your JFrog customer support contact.

Thanks Alex! He had actually directed me to create this. Should I also open a support ticket as well?

alexhung commented 1 week ago

@pshutt97 Yes because this is not specifically a TF provider issue. This feature must be added to the Artifactory API first before I can add support for it in the provider.

pshutt97 commented 1 week ago

Awesome, thanks!!!

alexhung commented 1 week ago

Related to #1069