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

upstream v5.55.0 #4102

Merged
merged 9 commits into from
Jun 24, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ index abc31f0d40..ebf1de5fb3 100644
names.AttrEnabled: {
Type: schema.TypeBool,
diff --git a/internal/service/appsync/api_key.go b/internal/service/appsync/api_key.go
index fbdf814b82..ae8e490533 100644
index fbdca7da91..9cdc01f8ec 100644
--- a/internal/service/appsync/api_key.go
+++ b/internal/service/appsync/api_key.go
@@ -36,7 +36,7 @@ func ResourceAPIKey() *schema.Resource {
@@ -49,7 +49,7 @@ func resourceAPIKey() *schema.Resource {
names.AttrDescription: {
Type: schema.TypeString,
Optional: true,
- Default: "Managed by Terraform",
+ Default: "Managed by Pulumi",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit tedious but we could move this from a patch some Go code running on provider init. Fewer patches, less busywork.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a ticket for this already?

},
"api_id": {
"expires": {
Type: schema.TypeString,
diff --git a/internal/service/cloudfront/origin_access_control.go b/internal/service/cloudfront/origin_access_control.go
index 837e79c057..8fc8280900 100644
Expand Down
62 changes: 16 additions & 46 deletions patches/0036-Disable-retry-for-KMS-access-denied-in-lambda.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: [PATCH] Disable retry for KMS access denied in lambda

diff --git a/internal/service/lambda/service_package_extra.go b/internal/service/lambda/service_package_extra.go
new file mode 100644
index 0000000000..4625f9e31c
index 0000000000..ffd7fa9728
--- /dev/null
+++ b/internal/service/lambda/service_package_extra.go
@@ -0,0 +1,48 @@
@@ -0,0 +1,41 @@
+package lambda
+
+import (
Expand All @@ -19,7 +19,6 @@ index 0000000000..4625f9e31c
+ retry_sdkv2 "github.com/aws/aws-sdk-go-v2/aws/retry"
+ lambda_sdkv2 "github.com/aws/aws-sdk-go-v2/service/lambda"
+ tfawserr_sdkv2 "github.com/hashicorp/aws-sdk-go-base/v2/tfawserr"
+ "github.com/hashicorp/terraform-plugin-log/tflog"
+ "github.com/hashicorp/terraform-provider-aws/internal/conns"
+ "github.com/hashicorp/terraform-provider-aws/names"
+)
Expand All @@ -43,71 +42,42 @@ index 0000000000..4625f9e31c
+ }
+ return aws_sdkv2.UnknownTernary // Delegate
+ })
+ return lambda_sdkv2.NewFromConfig(cfg, func(o *lambda_sdkv2.Options) {
+ if endpoint := config[names.AttrEndpoint].(string); endpoint != "" {
+ tflog.Debug(ctx, "setting endpoint", map[string]any{
+ "tf_aws.endpoint": endpoint,
+ })
+ o.BaseEndpoint = aws_sdkv2.String(endpoint)
+
+ if o.EndpointOptions.UseFIPSEndpoint == aws_sdkv2.FIPSEndpointStateEnabled {
+ tflog.Debug(ctx, "endpoint set, ignoring UseFIPSEndpoint setting")
+ o.EndpointOptions.UseFIPSEndpoint = aws_sdkv2.FIPSEndpointStateDisabled
+ }
+ }
+ o.Retryer = conns.AddIsErrorRetryables(cfg.Retryer().(aws_sdkv2.RetryerV2), retry)
+ }), nil
+ return lambda_sdkv2.NewFromConfig(cfg,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's multiple similar changes to patches in this PR.
Upstream introduces some helpers for configuring the endpoint: https://github.com/hashicorp/terraform-provider-aws/pull/38057/files

+ lambda_sdkv2.WithEndpointResolverV2(newEndpointResolverSDKv2()),
+ withBaseEndpoint(config[names.AttrEndpoint].(string)),
+ func(o *lambda_sdkv2.Options) {
+ o.Retryer = conns.AddIsErrorRetryables(cfg.Retryer().(aws_sdkv2.RetryerV2), retry)
+ },
+ ), nil
+}
diff --git a/internal/service/lambda/service_package_gen.go b/internal/service/lambda/service_package_gen.go
index 6b8ecf2c57..72d8c48672 100644
index 95c6c04302..1ebeaf2126 100644
--- a/internal/service/lambda/service_package_gen.go
+++ b/internal/service/lambda/service_package_gen.go
@@ -5,9 +5,6 @@ package lambda
@@ -5,8 +5,6 @@ package lambda
import (
"context"

- aws_sdkv2 "github.com/aws/aws-sdk-go-v2/aws"
- lambda_sdkv2 "github.com/aws/aws-sdk-go-v2/service/lambda"
- "github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/hashicorp/terraform-provider-aws/internal/conns"
"github.com/hashicorp/terraform-provider-aws/internal/types"
"github.com/hashicorp/terraform-provider-aws/names"
@@ -135,25 +132,6 @@ func (p *servicePackage) ServicePackageName() string {
@@ -134,16 +132,6 @@ func (p *servicePackage) ServicePackageName() string {
return names.Lambda
}

-// NewClient returns a new AWS SDK for Go v2 client for this service package's AWS API.
-func (p *servicePackage) NewClient(ctx context.Context, config map[string]any) (*lambda_sdkv2.Client, error) {
- cfg := *(config["aws_sdkv2_config"].(*aws_sdkv2.Config))
-
- return lambda_sdkv2.NewFromConfig(cfg, func(o *lambda_sdkv2.Options) {
- if endpoint := config[names.AttrEndpoint].(string); endpoint != "" {
- tflog.Debug(ctx, "setting endpoint", map[string]any{
- "tf_aws.endpoint": endpoint,
- })
- o.BaseEndpoint = aws_sdkv2.String(endpoint)
-
- if o.EndpointOptions.UseFIPSEndpoint == aws_sdkv2.FIPSEndpointStateEnabled {
- tflog.Debug(ctx, "endpoint set, ignoring UseFIPSEndpoint setting")
- o.EndpointOptions.UseFIPSEndpoint = aws_sdkv2.FIPSEndpointStateDisabled
- }
- }
- }), nil
- return lambda_sdkv2.NewFromConfig(cfg,
- lambda_sdkv2.WithEndpointResolverV2(newEndpointResolverSDKv2()),
- withBaseEndpoint(config[names.AttrEndpoint].(string)),
- ), nil
-}
-
func ServicePackage(ctx context.Context) conns.ServicePackage {
return &servicePackage{}
}
diff --git a/names/data/names_data.csv b/names/data/names_data.csv
index e36b7a9a0c..ebe0f7ed17 100644
--- a/names/data/names_data.csv
+++ b/names/data/names_data.csv
@@ -218,7 +218,7 @@ kinesis-video-media,kinesisvideomedia,kinesisvideomedia,kinesisvideomedia,,kines
kinesis-video-signaling,kinesisvideosignaling,kinesisvideosignalingchannels,kinesisvideosignaling,,kinesisvideosignaling,,kinesisvideosignalingchannels,KinesisVideoSignaling,KinesisVideoSignalingChannels,,1,,,aws_kinesisvideosignaling_,,kinesisvideosignaling_,Kinesis Video Signaling,Amazon,,x,,,,,Kinesis Video Signaling,,,,
kms,kms,kms,kms,,kms,,,KMS,KMS,,,2,,aws_kms_,,kms_,KMS (Key Management),AWS,,,,,,,KMS,ListKeys,,,
lakeformation,lakeformation,lakeformation,lakeformation,,lakeformation,,,LakeFormation,LakeFormation,,,2,,aws_lakeformation_,,lakeformation_,Lake Formation,AWS,,,,,,,LakeFormation,ListResources,,,
-lambda,lambda,lambda,lambda,,lambda,,,Lambda,Lambda,,,2,,aws_lambda_,,lambda_,Lambda,AWS,,,,,,,Lambda,ListFunctions,,,
+lambda,lambda,lambda,lambda,,lambda,,,Lambda,Lambda,x,,2,,aws_lambda_,,lambda_,Lambda,AWS,,,,,,,Lambda,ListFunctions,,,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wish GitHub knew how to display CSV diffs properly.. This is terrible.

launch-wizard,launchwizard,launchwizard,launchwizard,,launchwizard,,,LaunchWizard,LaunchWizard,,,2,,aws_launchwizard_,,launchwizard_,Launch Wizard,AWS,,,,,,,Launch Wizard,ListWorkloads,,,
lex-models,lexmodels,lexmodelbuildingservice,lexmodelbuildingservice,,lexmodels,,lexmodelbuilding;lexmodelbuildingservice;lex,LexModels,LexModelBuildingService,,1,,aws_lex_,aws_lexmodels_,,lex_,Lex Model Building,Amazon,,,,,,,Lex Model Building Service,GetBots,,,
lexv2-models,lexv2models,lexmodelsv2,lexmodelsv2,,lexv2models,,lexmodelsv2,LexV2Models,LexModelsV2,,,2,,aws_lexv2models_,,lexv2models_,Lex V2 Models,Amazon,,,,,,,Lex Models V2,ListBots,,,
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,32 @@ Subject: [PATCH] Patch ACM retry to not retry after LimitExceededException


diff --git a/internal/service/acm/service_package_gen.go b/internal/service/acm/service_package_gen.go
index cd3c01f9c9..b993553de2 100644
index d76d553329..7f9a9ca461 100644
--- a/internal/service/acm/service_package_gen.go
+++ b/internal/service/acm/service_package_gen.go
@@ -6,8 +6,10 @@ import (
@@ -6,7 +6,9 @@ import (
"context"

aws_sdkv2 "github.com/aws/aws-sdk-go-v2/aws"
+ retry_sdkv2 "github.com/aws/aws-sdk-go-v2/aws/retry"
acm_sdkv2 "github.com/aws/aws-sdk-go-v2/service/acm"
"github.com/hashicorp/terraform-plugin-log/tflog"
+ tfawserr_sdkv2 "github.com/hashicorp/aws-sdk-go-base/v2/tfawserr"
"github.com/hashicorp/terraform-provider-aws/internal/conns"
"github.com/hashicorp/terraform-provider-aws/internal/types"
"github.com/hashicorp/terraform-provider-aws/names"
@@ -73,6 +75,14 @@ func (p *servicePackage) NewClient(ctx context.Context, config map[string]any) (
o.EndpointOptions.UseFIPSEndpoint = aws_sdkv2.FIPSEndpointStateDisabled
}
}
+
+ o.Retryer = conns.AddIsErrorRetryables(cfg.Retryer().(aws_sdkv2.RetryerV2), retry_sdkv2.IsErrorRetryableFunc(func(err error) aws_sdkv2.Ternary {
+ if tfawserr_sdkv2.ErrMessageContains(err, "LimitExceededException", "the maximum number of") &&
+ tfawserr_sdkv2.ErrMessageContains(err, "LimitExceededException", "certificates in the last year") {
+ return aws_sdkv2.FalseTernary
+ }
+ return aws_sdkv2.UnknownTernary // Delegate to configured Retryer.
+ }))
}), nil
@@ -63,6 +65,15 @@ func (p *servicePackage) NewClient(ctx context.Context, config map[string]any) (
return acm_sdkv2.NewFromConfig(cfg,
acm_sdkv2.WithEndpointResolverV2(newEndpointResolverSDKv2()),
withBaseEndpoint(config[names.AttrEndpoint].(string)),
+ func(o *acm_sdkv2.Options) {
+ o.Retryer = conns.AddIsErrorRetryables(cfg.Retryer().(aws_sdkv2.RetryerV2), retry_sdkv2.IsErrorRetryableFunc(func(err error) aws_sdkv2.Ternary {
+ if tfawserr_sdkv2.ErrMessageContains(err, "LimitExceededException", "the maximum number of") &&
+ tfawserr_sdkv2.ErrMessageContains(err, "LimitExceededException", "certificates in the last year") {
+ return aws_sdkv2.FalseTernary
+ }
+ return aws_sdkv2.UnknownTernary // Delegate to configured Retryer.
+ }))
+ },
), nil
}

24 changes: 12 additions & 12 deletions patches/0038-Restore-legacy-bucket.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,47 @@ Subject: [PATCH] Restore legacy bucket


diff --git a/go.mod b/go.mod
index 57846f59c0..7fb556ab81 100644
index 440fb568e1..f06274cb02 100644
--- a/go.mod
+++ b/go.mod
@@ -199,6 +199,7 @@ require (
@@ -203,6 +203,7 @@ require (
github.com/gertd/go-pluralize v0.2.1
github.com/google/go-cmp v0.6.0
github.com/hashicorp/aws-cloudformation-resource-schema-sdk-go v0.23.0
+ github.com/hashicorp/aws-sdk-go-base v1.1.0
github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.53
github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2 v2.0.0-beta.54
github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.54
github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2 v2.0.0-beta.55
github.com/hashicorp/awspolicyequivalence v1.6.0
diff --git a/go.sum b/go.sum
index e5dab74913..94e4b1d8b7 100644
index d82438079c..2728fc20b2 100644
--- a/go.sum
+++ b/go.sum
@@ -461,6 +461,7 @@ github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
@@ -469,6 +469,7 @@ github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
+github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg=
github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
@@ -480,6 +481,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
@@ -488,6 +489,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/hashicorp/aws-cloudformation-resource-schema-sdk-go v0.23.0 h1:l16/Vrl0+x+HjHJWEjcKPwHYoxN9EC78gAFXKlH6m84=
github.com/hashicorp/aws-cloudformation-resource-schema-sdk-go v0.23.0/go.mod h1:HAmscHyzSOfB1Dr16KLc177KNbn83wscnZC+N7WyaM8=
+github.com/hashicorp/aws-sdk-go-base v1.1.0 h1:27urM3JAp6v+Oj/Ea5ULZwuFPK9cO1RUdEpV+rNdSAc=
+github.com/hashicorp/aws-sdk-go-base v1.1.0/go.mod h1:2fRjWDv3jJBeN6mVWFHV6hFTNeFBx2gpDLQaZNxUVAY=
github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.53 h1:jgOMbQlypMpUMaqYJotjT7ERSMvQP00Mppgjgh8lNt8=
github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.53/go.mod h1:nvpXIeF0ANfZ7sMssXKSSR3pyXfksajxoC2tl4jjN08=
github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2 v2.0.0-beta.54 h1:raRbM2Wynqv0Nyhe7AwVnFgb2roGSvpSUeQKxEg8Lts=
@@ -555,6 +558,7 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i
github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.54 h1:O37FpbmkDSmSPgukMJLAzJzo5WBSFQx0iwn4PlY6BKI=
github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.54/go.mod h1:TJ+Mz49cn0zKURLX5haphWDbmGWz15OsEiLp1CcXDwY=
github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2 v2.0.0-beta.55 h1:7izXD15MCmPcWbKJ5qAwcSlnWvTwkioIJkq0+OJIJG0=
@@ -563,6 +566,7 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c=
github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo=
+github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
@@ -667,6 +671,7 @@ golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
@@ -675,6 +679,7 @@ golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
Expand Down
6 changes: 3 additions & 3 deletions patches/0047-restore-ECRConn.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ Subject: [PATCH] restore ECRConn


diff --git a/internal/conns/awsclient_gen.go b/internal/conns/awsclient_gen.go
index fa56803e05..673dc98e1a 100644
index 14a2b6eec0..76f3e493ca 100644
--- a/internal/conns/awsclient_gen.go
+++ b/internal/conns/awsclient_gen.go
@@ -198,6 +198,7 @@ import (
@@ -199,6 +199,7 @@ import (
directconnect_sdkv1 "github.com/aws/aws-sdk-go/service/directconnect"
directoryservice_sdkv1 "github.com/aws/aws-sdk-go/service/directoryservice"
ec2_sdkv1 "github.com/aws/aws-sdk-go/service/ec2"
+ ecr_sdkv1 "github.com/aws/aws-sdk-go/service/ecr"
ecs_sdkv1 "github.com/aws/aws-sdk-go/service/ecs"
efs_sdkv1 "github.com/aws/aws-sdk-go/service/efs"
elasticache_sdkv1 "github.com/aws/aws-sdk-go/service/elasticache"
@@ -591,6 +592,10 @@ func (c *AWSClient) EC2Client(ctx context.Context) *ec2_sdkv2.Client {
@@ -596,6 +597,10 @@ func (c *AWSClient) EC2Client(ctx context.Context) *ec2_sdkv2.Client {
return errs.Must(client[*ec2_sdkv2.Client](ctx, c, names.EC2, make(map[string]any)))
}

Expand Down
6 changes: 3 additions & 3 deletions patches/0049-restore-ecr-NewConn.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] restore ecr NewConn


diff --git a/internal/service/ecr/service_package_gen.go b/internal/service/ecr/service_package_gen.go
index 3cdc67b28e..d8a080d4b2 100644
index d04ab8e2aa..8770883311 100644
--- a/internal/service/ecr/service_package_gen.go
+++ b/internal/service/ecr/service_package_gen.go
@@ -7,6 +7,9 @@ import (
Expand All @@ -15,10 +15,10 @@ index 3cdc67b28e..d8a080d4b2 100644
+ aws_sdkv1 "github.com/aws/aws-sdk-go/aws"
+ session_sdkv1 "github.com/aws/aws-sdk-go/aws/session"
+ ecr_sdkv1 "github.com/aws/aws-sdk-go/service/ecr"
"github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/hashicorp/terraform-provider-aws/internal/conns"
"github.com/hashicorp/terraform-provider-aws/internal/types"
@@ -104,6 +107,13 @@ func (p *servicePackage) ServicePackageName() string {
"github.com/hashicorp/terraform-provider-aws/names"
@@ -103,6 +106,13 @@ func (p *servicePackage) ServicePackageName() string {
return names.ECR
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ index 0000000000..737faef4a7
+ return out, metadata, err
+}
diff --git a/internal/service/lambda/service_package_extra.go b/internal/service/lambda/service_package_extra.go
index 4625f9e31c..0633092751 100644
index ffd7fa9728..b958a21bff 100644
--- a/internal/service/lambda/service_package_extra.go
+++ b/internal/service/lambda/service_package_extra.go
@@ -6,6 +6,7 @@ import (
Expand All @@ -136,13 +136,14 @@ index 4625f9e31c..0633092751 100644
lambda_sdkv2 "github.com/aws/aws-sdk-go-v2/service/lambda"
+ "github.com/aws/smithy-go/middleware"
tfawserr_sdkv2 "github.com/hashicorp/aws-sdk-go-base/v2/tfawserr"
"github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/hashicorp/terraform-provider-aws/internal/conns"
@@ -43,6 +44,19 @@ func (p *servicePackage) NewClient(ctx context.Context, config map[string]any) (
o.EndpointOptions.UseFIPSEndpoint = aws_sdkv2.FIPSEndpointStateDisabled
}
}
+
"github.com/hashicorp/terraform-provider-aws/names"
@@ -35,7 +36,20 @@ func (p *servicePackage) NewClient(ctx context.Context, config map[string]any) (
lambda_sdkv2.WithEndpointResolverV2(newEndpointResolverSDKv2()),
withBaseEndpoint(config[names.AttrEndpoint].(string)),
func(o *lambda_sdkv2.Options) {
- o.Retryer = conns.AddIsErrorRetryables(cfg.Retryer().(aws_sdkv2.RetryerV2), retry)
+
+ // Switch out the terraform http logging middleware with a custom logging middleware that does not log the
+ // lambda code. Logging the lambda code leads to memory bloating because it allocates a lot of copies of the
+ // body
Expand All @@ -155,6 +156,7 @@ index 4625f9e31c..0633092751 100644
+ err = stack.Deserialize.Add(NewWrappedRequestResponseLogger(loggingMiddleware), middleware.After)
+ return err
+ })
o.Retryer = conns.AddIsErrorRetryables(cfg.Retryer().(aws_sdkv2.RetryerV2), retry)
}), nil
+ o.Retryer = conns.AddIsErrorRetryables(cfg.Retryer().(aws_sdkv2.RetryerV2), retry)
},
), nil
}