Bug #46263
closedS3 API DELETE /{bucket}?encryption or DELETE /{bucket}?replication remove bucket
0%
Description
When calling the S3 API DeleteBucketReplication [1] or DeleteBucketEncryption [2] on a bucket, the rgw delete the bucket.
Terraform will call those S3 API to apply a simple S3 bucket plan. But the rgw doesn't simply ignore the unsupported operations, it really delete the bucket.
To reproduce:
1. create an empty bucket
PUT /{bucket} HTTP/1.1
Host: cname.domain.com
2.1 try to delete the bucket encryption
DELETE /{bucket}?encryption HTTP/1.1
Host: cname.domain.com
2.2 try to delete the bucket replication
DELETE /{bucket}?replication HTTP/1.1
Host: cname.domain.com
3. in both case 2.1 or 2.2 the bucket will be effectively deleted
[1] https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketReplication.html
[2] https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html