From b29621324cff9f805a41765a41741aec7e7f4fc3 Mon Sep 17 00:00:00 2001 From: Matt Bush Date: Mon, 22 Apr 2024 16:50:07 -0700 Subject: [PATCH] Switch to getter to expose aws client internals Signed-off-by: Matt Bush --- go.mod | 2 +- go.sum | 4 ++-- internal/clients/aws.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index f217d8cc35..698ad850e8 100644 --- a/go.mod +++ b/go.mod @@ -344,6 +344,6 @@ require ( replace golang.org/x/exp => golang.org/x/exp v0.0.0-20231006140011-7918f672742d -replace github.com/hashicorp/terraform-provider-aws => github.com/mbbush/terraform-provider-aws v0.0.0-20240419234332-0ec53cbccd61 +replace github.com/hashicorp/terraform-provider-aws => github.com/mbbush/terraform-provider-aws v0.0.0-20240422224835-5d704d4752cd replace github.com/hashicorp/terraform-plugin-log => github.com/gdavison/terraform-plugin-log v0.0.0-20230928191232-6c653d8ef8fb diff --git a/go.sum b/go.sum index c15ba1fc67..203680d264 100644 --- a/go.sum +++ b/go.sum @@ -596,8 +596,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= -github.com/mbbush/terraform-provider-aws v0.0.0-20240419234332-0ec53cbccd61 h1:A5UX0w5PpT5IrxblNQ+z/S0811FoDI8OnZXeMBiaOaY= -github.com/mbbush/terraform-provider-aws v0.0.0-20240419234332-0ec53cbccd61/go.mod h1:VNcpSYvh4eYoT0qmtnaBoUwjlx4NOEzspt4FFNGX8Ac= +github.com/mbbush/terraform-provider-aws v0.0.0-20240422224835-5d704d4752cd h1:ESfFGrzgFTABwwH6ItzlL1kdog3DnZTqQIjPGep3soc= +github.com/mbbush/terraform-provider-aws v0.0.0-20240422224835-5d704d4752cd/go.mod h1:VNcpSYvh4eYoT0qmtnaBoUwjlx4NOEzspt4FFNGX8Ac= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= diff --git a/internal/clients/aws.go b/internal/clients/aws.go index 26825b443b..2bf32aafe5 100644 --- a/internal/clients/aws.go +++ b/internal/clients/aws.go @@ -240,7 +240,7 @@ func configureNoForkAWSClient(ctx context.Context, ps *terraform.Setup, config * // an http.RoundTripper. To learn how SDK v1 session handler phases // map to SDK v2 middleware stack steps, see: // https://aws.github.io/aws-sdk-go-v2/docs/migrating/#handler-phases - tfAwsConnsClient.Session.Handlers.Send.PushBack(func(r *awsrequest.Request) { + tfAwsConnsClient.Session().Handlers.Send.PushBack(func(r *awsrequest.Request) { // In case of API errors (or no errors), r.Error is nil. // In case of connection errors, r.Error is non-nil. if r.Error == nil {