-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
feat: Migrate S3 backend to AWS SDK for Go v2 #33469
Conversation
31ad884
to
20b9ec2
Compare
Signed-off-by: Natsuki Ikeguchi <me@s6n.jp>
20b9ec2
to
84b757d
Compare
Signed-off-by: Natsuki Ikeguchi <me@s6n.jp>
I've tested on my local environment and it worked. |
if err != nil { | ||
var noSuchBucket *types.NoSuchBucket | ||
if errors.As(err, &noSuchBucket) { | ||
return nil, fmt.Errorf(errS3NoSuchBucket, err) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What should we do here if an unexpected error is occurred? Previous implementation does not have any error handling for this too, and that causes a panic.
@@ -55,8 +58,9 @@ func TestBackendConfig(t *testing.T) { | |||
} | |||
|
|||
b := backend.TestBackendConfig(t, New(), backend.TestWrapConfig(config)).(*Backend) | |||
options := reflect.ValueOf(*b.s3Client).Elem().FieldByName("options").Interface().(s3.Options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any options to do this in much better way?
Thanks for submitting this PR, @siketyan. Because We have an active project to update this, and we will try to use your changes where we can. |
aws-sdk-go v1 has backport to support AWS Identity Center now, and the SDK used in Terraform S3 backend will be updated in #33522. |
Hi @siketyan 👋 - thanks for your effort on this! As @gdavison mentioned earlier, we've been working on a broader effort to modernize the S3 backend, which will occur over several minor releases. #33730 covered much of the scope of this PR and will be released with Terraform 1.6, so I believe this can now be closed. Thanks again for your engagement! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Fixes #30443
Fixes #32448
Fixes #32465
Since this will be my first-time contribution for Terraform, please let me know if I am missing something to do, or there are some reason(s) that are blocking migration of aws-sdk-go.
Target Release
1.6.x?
Draft CHANGELOG entry
ENHANCEMENTS