Skip to content

Commit

Permalink
Revert the migration to AWS SDK for Go v2 for `aws_s3_bucket_replicat…
Browse files Browse the repository at this point in the history
…ion_configuration` and `aws_s3_bucket_lifecycle_configuration`

awaiting the resolution of aws/aws-sdk-go-v2#2162.
This was done via `git revert --no-commit 4850ad9..50100db`.
Restoring this work should be done by `git revert` on this commit.
  • Loading branch information
ewbankkit committed Sep 27, 2023
1 parent 50100db commit 47f1924
Show file tree
Hide file tree
Showing 13 changed files with 1,901 additions and 1,633 deletions.
4 changes: 0 additions & 4 deletions .ci/.golangci2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,6 @@ issues:
- staticcheck
path: "internal/service/s3"
text: "SA1019: \\w+.(\\w+) is deprecated: (\\w+) has been deprecated"
- linters:
- staticcheck
path: "internal/service/s3"
text: "SA1019: \\w+.(\\w+) is deprecated: This member has been deprecated"
- linters:
- staticcheck
path: internal/service/securityhub/
Expand Down
8 changes: 2 additions & 6 deletions internal/service/s3/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ import (

const (
resNameBucket = "Bucket"

// General timeout for S3 bucket changes to propagate.
// See https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html#ConsistencyModel.
s3BucketPropagationTimeout = 2 * time.Minute // nosemgrep:ci.s3-in-const-name, ci.s3-in-var-name
)

// @SDKResource("aws_s3_bucket", name="Bucket")
Expand Down Expand Up @@ -1051,7 +1047,7 @@ func resourceBucketRead(ctx context.Context, d *schema.ResourceData, meta interf
return diags
}

if err != nil && !tfawserr.ErrCodeEquals(err, errCodeNoSuchLifecycleConfiguration, errCodeNotImplemented, errCodeXNotImplemented) {
if err != nil && !tfawserr.ErrCodeEquals(err, ErrCodeNoSuchLifecycleConfiguration, errCodeNotImplemented, errCodeXNotImplemented) {
return sdkdiag.AppendErrorf(diags, "getting S3 Bucket (%s) Lifecycle Configuration: %s", d.Id(), err)
}

Expand Down Expand Up @@ -1080,7 +1076,7 @@ func resourceBucketRead(ctx context.Context, d *schema.ResourceData, meta interf
return diags
}

if err != nil && !tfawserr.ErrCodeEquals(err, errCodeReplicationConfigurationNotFound, errCodeNotImplemented, errCodeXNotImplemented) {
if err != nil && !tfawserr.ErrCodeEquals(err, ErrCodeReplicationConfigurationNotFound, errCodeNotImplemented, errCodeXNotImplemented) {
return sdkdiag.AppendErrorf(diags, "getting S3 Bucket replication: %s", err)
}

Expand Down
Loading

0 comments on commit 47f1924

Please sign in to comment.