Skip to content

Commit

Permalink
r/aws_s3_bucket_accelerate_configuration: Ensure NotFound after resou…
Browse files Browse the repository at this point in the history
…rce Delete.
  • Loading branch information
ewbankkit committed Sep 20, 2023
1 parent e92e582 commit ced323d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/service/s3/bucket_accelerate_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,14 @@ func resourceBucketAccelerateConfigurationDelete(ctx context.Context, d *schema.
return diag.Errorf("deleting S3 Bucket Accelerate Configuration (%s): %s", d.Id(), err)
}

_, err = tfresource.RetryUntilNotFound(ctx, s3BucketPropagationTimeout, func() (interface{}, error) {
return findBucketAccelerateConfiguration(ctx, conn, bucket, expectedBucketOwner)
})

if err != nil {
return diag.Errorf("waiting for S3 Bucket Accelerate Configuration (%s) delete: %s", d.Id(), err)
}

return nil
}

Expand Down

0 comments on commit ced323d

Please sign in to comment.