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

Add support for a new 3rd party S3 (Naver Cloud Platform) #37801

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
4 changes: 2 additions & 2 deletions internal/service/s3/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ func resourceBucketRead(ctx context.Context, d *schema.ResourceData, meta interf
switch {
case err == nil:
d.Set("acceleration_status", bucketAccelerate.Status)
case tfresource.NotFound(err), tfawserr.ErrCodeEquals(err, errCodeMethodNotAllowed, errCodeNotImplemented, errCodeXNotImplemented, errCodeUnsupportedArgument):
case tfresource.NotFound(err), tfawserr.ErrCodeEquals(err, errCodeMethodNotAllowed, errCodeNotImplemented, errCodeXNotImplemented, errCodeUnsupportedArgument, errCodeUnsupportedOperation):
d.Set("acceleration_status", nil)
default:
return diag.Errorf("reading S3 Bucket (%s) accelerate configuration: %s", d.Id(), err)
Expand Down Expand Up @@ -1072,7 +1072,7 @@ func resourceBucketRead(ctx context.Context, d *schema.ResourceData, meta interf
if err := d.Set("server_side_encryption_configuration", flattenBucketServerSideEncryptionConfiguration(encryptionConfiguration)); err != nil {
return sdkdiag.AppendErrorf(diags, "setting server_side_encryption_configuration: %s", err)
}
case tfresource.NotFound(err), tfawserr.ErrCodeEquals(err, errCodeMethodNotAllowed, errCodeNotImplemented, errCodeXNotImplemented):
case tfresource.NotFound(err), tfawserr.ErrCodeEquals(err, errCodeMethodNotAllowed, errCodeNotImplemented, errCodeXNotImplemented, errCodeUnsupportedOperation):
d.Set("server_side_encryption_configuration", nil)
default:
return diag.Errorf("reading S3 Bucket (%s) server-side encryption configuration: %s", d.Id(), err)
Expand Down
3 changes: 2 additions & 1 deletion internal/service/s3/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ const (
errCodeUnsupportedArgument = "UnsupportedArgument"
// errCodeXNotImplemented is returned from third-party S3 API implementations.
// Reference: https://github.com/hashicorp/terraform-provider-aws/issues/14645.
errCodeXNotImplemented = "XNotImplemented"
errCodeXNotImplemented = "XNotImplemented"
errCodeUnsupportedOperation = "UnsupportedOperation"
)

func errDirectoryBucket(err error) error {
Expand Down
2 changes: 1 addition & 1 deletion internal/service/s3/tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func bucketListTags(ctx context.Context, conn *s3.Client, identifier string, opt

output, err := conn.GetBucketTagging(ctx, input, optFns...)

if tfawserr.ErrCodeEquals(err, errCodeNoSuchTagSet, errCodeMethodNotAllowed, errCodeNotImplemented, errCodeXNotImplemented) {
if tfawserr.ErrCodeEquals(err, errCodeNoSuchTagSet, errCodeMethodNotAllowed, errCodeNotImplemented, errCodeXNotImplemented, errCodeUnsupportedOperation) {
return tftags.New(ctx, nil), nil
}
if err != nil {
Expand Down