diff --git a/internal/service/s3/bucket_acl.go b/internal/service/s3/bucket_acl.go index 9192e6bff06..a99aa033569 100644 --- a/internal/service/s3/bucket_acl.go +++ b/internal/service/s3/bucket_acl.go @@ -26,7 +26,7 @@ func ResourceBucketAcl() *schema.Resource { CreateContext: resourceBucketAclCreate, ReadContext: resourceBucketAclRead, UpdateContext: resourceBucketAclUpdate, - DeleteContext: schema.NoopContext, + DeleteContext: resourceBucketAclDelete, Importer: &schema.ResourceImporter{ StateContext: schema.ImportStatePassthroughContext, }, @@ -243,6 +243,11 @@ func resourceBucketAclUpdate(ctx context.Context, d *schema.ResourceData, meta i return resourceBucketAclRead(ctx, d, meta) } +func resourceBucketAclDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + log.Printf("[WARN] Cannot destroy S3 Bucket ACL. Terraform will remove this resource from the state file, however resources may remain.") + return nil +} + func expandBucketAclAccessControlPolicy(l []interface{}) *s3.AccessControlPolicy { if len(l) == 0 || l[0] == nil { return nil