aminueza / terraform-provider-minio

Terraform provider for managing MinIO S3 buckets and IAM Users.
https://registry.terraform.io/providers/aminueza/minio
GNU Affero General Public License v3.0
243 stars 73 forks source link

Destroy object versions on bucket force_destroy #524

Closed pjsier closed 1 year ago

pjsier commented 1 year ago

Destroy object versions on force destroying bucket

Load all object versions when trying to clear out objects when force_destroy is set on a bucket. Previously this did not incorporate versions, so versioned objects would not all be deleted and cause destruction to fail.

Quick note that the test isn't great here, essentially just making sure we can delete a bucket with versioning and force_destroy, but I'm running into errors without logs when I include minio_s3_object resources and update them. Open to suggestions there, but wanted to add some testing to be safe.

Closing issues

pjsier commented 1 year ago

Quick update that @nixargh who originally reported #509 confirmed that this addresses the issue. This should be ready to go whenever anyone has a chance to review, thanks!

felladrin commented 1 year ago

Thanks, @pjsier! I'll release this fix as v1.18.2.