Skip to content

Commit

Permalink
Add 'context.Context' to 'AWSClient.S3ConnURICleaningDisabled()'.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Jun 7, 2023
1 parent 053922f commit f9f8108
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/service/s3/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -1377,7 +1377,7 @@ func resourceBucketDelete(ctx context.Context, d *schema.ResourceData, meta inte
// Use a S3 service client that can handle multiple slashes in URIs.
// While aws_s3_object resources cannot create these object
// keys, other AWS services and applications using the S3 Bucket can.
conn = meta.(*conns.AWSClient).S3ConnURICleaningDisabled()
conn := meta.(*conns.AWSClient).S3ConnURICleaningDisabled(ctx)

// bucket may have things delete them
log.Printf("[DEBUG] S3 Bucket attempting to forceDestroy %s", err)
Expand Down
2 changes: 1 addition & 1 deletion internal/service/s3/bucket_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2595,7 +2595,7 @@ func testAccCheckBucketExistsWithProvider(ctx context.Context, n string, provide
func testAccCheckBucketAddObjects(ctx context.Context, n string, keys ...string) resource.TestCheckFunc {
return func(s *terraform.State) error {
rs := s.RootModule().Resources[n]
conn := acctest.Provider.Meta().(*conns.AWSClient).S3ConnURICleaningDisabled()
conn := acctest.Provider.Meta().(*conns.AWSClient).S3ConnURICleaningDisabled(ctx)

for _, key := range keys {
_, err := conn.PutObjectWithContext(ctx, &s3.PutObjectInput{
Expand Down
2 changes: 1 addition & 1 deletion internal/service/s3/sweep.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func sweepObjects(region string) error {
return fmt.Errorf("getting client: %s", err)
}

conn := client.(*conns.AWSClient).S3ConnURICleaningDisabled()
conn := client.(*conns.AWSClient).S3ConnURICleaningDisabled(ctx)
input := &s3.ListBucketsInput{}

output, err := conn.ListBucketsWithContext(ctx, input)
Expand Down

0 comments on commit f9f8108

Please sign in to comment.