Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

r/aws_s3_bucket_website_configuration et al.: Migrate to AWS SDK for Go v2 #33537

Merged
merged 39 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
d2bee03
r/aws_s3_bucket_versioning: Cosmetics.
ewbankkit Sep 19, 2023
efe1166
r/aws_s3_bucket_website_configuration: Migrate to AWS SDK for Go v2.
ewbankkit Sep 19, 2023
962b228
r/aws_s3_bucket_website_configuration: Migrate acceptance tests to AW…
ewbankkit Sep 19, 2023
607a907
Add 'removeNilOrEmptyProtocol'.
ewbankkit Sep 19, 2023
569987f
Acceptance test output:
ewbankkit Sep 19, 2023
b15409a
r/aws_s3_bucket_object_lock_configuration: Migrate to AWS SDK for Go v2.
ewbankkit Sep 19, 2023
ed5ed50
r/aws_s3_bucket_object_lock_configuration: Migrate acceptance tests t…
ewbankkit Sep 19, 2023
4ef8099
Acceptance test output:
ewbankkit Sep 19, 2023
5f719e8
s3: Add 'errCodeObjectLockConfigurationNotFoundError'.
ewbankkit Sep 19, 2023
411504a
aws_s3_object: Check for object lock in sweeper.
ewbankkit Sep 19, 2023
54f42fd
r/aws_s3_bucket_analytics_configuration: Migrate to AWS SDK for Go v2.
ewbankkit Sep 20, 2023
286af34
r/aws_s3_bucket_analytics_configuration: Migrate acceptance tests to …
ewbankkit Sep 20, 2023
0b415c6
r/aws_s3_bucket_analytics_configuration: Remove flattener/expander un…
ewbankkit Sep 20, 2023
3bd3184
r/aws_s3_bucket_analytics_configuration: Fix 'missing required field,…
ewbankkit Sep 20, 2023
c06a88d
Acceptance test output:
ewbankkit Sep 20, 2023
e92e582
r/aws_s3_bucket_policy: Ensure NotFound after resource Delete.
ewbankkit Sep 20, 2023
ced323d
r/aws_s3_bucket_accelerate_configuration: Ensure NotFound after resou…
ewbankkit Sep 20, 2023
1ecf986
r/aws_s3_bucket_versioning: Ensure NotFound after resource Delete.
ewbankkit Sep 20, 2023
2278370
r/aws_s3_bucket_object_lock_configuration: Ensure NotFound after reso…
ewbankkit Sep 20, 2023
a6224f5
r/aws_s3_bucket_website_configuration: Ensure NotFound after resource…
ewbankkit Sep 20, 2023
d3c864b
r/aws_s3_bucket_server_side_encryption_configuration: Migrate to AWS …
ewbankkit Sep 20, 2023
1a127a6
r/aws_s3_bucket_server_side_encryption_configuration: Migrate accepta…
ewbankkit Sep 20, 2023
bfa6ba0
Acceptance test output:
ewbankkit Sep 20, 2023
c1b1f37
r/aws_s3_bucket_acl: Migrate to AWS SDK for Go v2.
ewbankkit Sep 20, 2023
0574e04
r/aws_s3_bucket_acl: Migrate acceptance tests to AWS SDK for Go v2.
ewbankkit Sep 20, 2023
ee8b2e7
Acceptance test output:
ewbankkit Sep 20, 2023
879111c
r/aws_s3_bucket_website_configuration: Ensure Found after resource Cr…
ewbankkit Sep 20, 2023
d2356f8
r/aws_s3_bucket_object_lock_configuration: Ensure Found after resourc…
ewbankkit Sep 20, 2023
928b779
r/aws_s3_bucket_policy: Ensure Found after resource Create.
ewbankkit Sep 20, 2023
7d1d307
r/aws_s3_bucket_accelerate_configuration: Ensure Found after resource…
ewbankkit Sep 20, 2023
acc87b0
r/aws_s3_bucket_analytics_configuration: Ensure Found after resource …
ewbankkit Sep 20, 2023
dd61a84
Add comment.
ewbankkit Sep 20, 2023
075d468
Revert "r/aws_s3_bucket_versioning: Ensure NotFound after resource De…
ewbankkit Sep 21, 2023
1647d54
Revert "r/aws_s3_bucket_accelerate_configuration: Ensure NotFound aft…
ewbankkit Sep 21, 2023
f3c3248
r/aws_s3_bucket_cors_configuration: Migrate to AWS SDK for Go v2.
ewbankkit Sep 21, 2023
2bc52df
r/aws_s3_bucket_cors_configuration: Migrate acceptance tests to AWS S…
ewbankkit Sep 21, 2023
ea364ae
Acceptance test output:
ewbankkit Sep 21, 2023
4fa9c17
Merge branch 'main' into f-aws_s3_bucket_website_configuration-aws-sd…
ewbankkit Sep 22, 2023
bd9831d
Add CHANGELOG entry.
ewbankkit Sep 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/33537.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_s3_bucket_policy: Fix intermittent `couldn't find resource` errors on resource Create
```
4 changes: 2 additions & 2 deletions internal/service/s3/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ func resourceBucketRead(ctx context.Context, d *schema.ResourceData, meta interf
return diags
}

if err != nil && !tfawserr.ErrCodeEquals(err, ErrCodeNoSuchCORSConfiguration, errCodeNotImplemented, errCodeXNotImplemented) {
if err != nil && !tfawserr.ErrCodeEquals(err, errCodeNoSuchCORSConfiguration, errCodeNotImplemented, errCodeXNotImplemented) {
return sdkdiag.AppendErrorf(diags, "getting S3 Bucket CORS configuration: %s", err)
}

Expand Down Expand Up @@ -906,7 +906,7 @@ func resourceBucketRead(ctx context.Context, d *schema.ResourceData, meta interf
if err != nil && !tfawserr.ErrCodeEquals(err,
errCodeMethodNotAllowed,
errCodeNotImplemented,
ErrCodeNoSuchWebsiteConfiguration,
errCodeNoSuchWebsiteConfiguration,
errCodeXNotImplemented,
) {
return sdkdiag.AppendErrorf(diags, "getting S3 Bucket website configuration: %s", err)
Expand Down
10 changes: 10 additions & 0 deletions internal/service/s3/bucket_accelerate_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ func resourceBucketAccelerateConfigurationCreate(ctx context.Context, d *schema.

d.SetId(CreateResourceID(bucket, expectedBucketOwner))

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

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

return resourceBucketAccelerateConfigurationRead(ctx, d, meta)
}

Expand Down Expand Up @@ -165,6 +173,8 @@ func resourceBucketAccelerateConfigurationDelete(ctx context.Context, d *schema.
return diag.Errorf("deleting S3 Bucket Accelerate Configuration (%s): %s", d.Id(), err)
}

// Don't wait for the accelerate configuration to disappear as it still exists after suspension.

return nil
}

Expand Down
Loading
Loading