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

Importing the object_locking state flawed, introduced at #453 #457

Closed Eilyre closed 1 year ago

Eilyre commented 1 year ago

Description

Did not get it right with #453, when importing an existing resource. The existing resource gets imported with object_locking attribute set to false, always.

Steps to Reproduce

  1. Have a bucket with object_locking: true
  2. Import it with terraform import
  3. Next apply, it will try to recreate the bucket due to object_locking state going from false -> true.

Expected behavior:

Next apply should have the correct state instead.

Additional Information

Thankfully does not impact default behaviour, where object_locking is set to false.