Skip to content

Commit

Permalink
Merge pull request #38931 from DanielRieske/f/migrate-opsworks-sdkv2
Browse files Browse the repository at this point in the history
Migrate `OpsWorks` resources to AWS SDK v2
  • Loading branch information
ewbankkit authored Aug 20, 2024
2 parents ac8c7bc + 34df9da commit 76b482c
Show file tree
Hide file tree
Showing 51 changed files with 1,178 additions and 1,054 deletions.
2 changes: 1 addition & 1 deletion .changelog/37871.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
`release-note:enhancement
```release-note:enhancement
resource/aws_batch_job_definition: Add `ecs_properties` argument
```
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/oam v1.13.5
github.com/aws/aws-sdk-go-v2/service/opensearch v1.39.3
github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.13.4
github.com/aws/aws-sdk-go-v2/service/opsworks v1.24.4
github.com/aws/aws-sdk-go-v2/service/organizations v1.30.3
github.com/aws/aws-sdk-go-v2/service/osis v1.12.4
github.com/aws/aws-sdk-go-v2/service/outposts v1.42.1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,8 @@ github.com/aws/aws-sdk-go-v2/service/opensearch v1.39.3 h1:EoXdh45m+CNUmP1tRFz+S
github.com/aws/aws-sdk-go-v2/service/opensearch v1.39.3/go.mod h1:dt1En8oUmuPUz5AZjWi+fBeekG3O8WejKi1wgoafwNk=
github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.13.4 h1:3Y4N61NHpii/6m38masM+VYJgnHhGtktEyJVZcTv0nc=
github.com/aws/aws-sdk-go-v2/service/opensearchserverless v1.13.4/go.mod h1:pQOhum5PBwXCSspA6bT4EZLhpawWF2aHTToUu/5vIBg=
github.com/aws/aws-sdk-go-v2/service/opsworks v1.24.4 h1:2bzNoZZWJ8+lRIBfY/FSOdcRIfMYAae9DFwcYxIwD5w=
github.com/aws/aws-sdk-go-v2/service/opsworks v1.24.4/go.mod h1:yjoW6GYtJ1dRtOth68jEL3gYgSXVJicc2Ljcjxt3s/4=
github.com/aws/aws-sdk-go-v2/service/organizations v1.30.3 h1:gYS53GRIaSesL04BlZA9MEBzDlENidWR/JDBXhZonFs=
github.com/aws/aws-sdk-go-v2/service/organizations v1.30.3/go.mod h1:qdJX3WZbuAan5dXCoinnJjuY1QERCpv3glXeI3+wbeA=
github.com/aws/aws-sdk-go-v2/service/osis v1.12.4 h1:D1+hSpaeBVydbHUc86o1Yv3EhOcM0CRazxOokfpC33g=
Expand Down
12 changes: 0 additions & 12 deletions internal/conns/awsclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ import (
config_sdkv2 "github.com/aws/aws-sdk-go-v2/config"
apigatewayv2_types "github.com/aws/aws-sdk-go-v2/service/apigatewayv2/types"
s3_sdkv2 "github.com/aws/aws-sdk-go-v2/service/s3"
aws_sdkv1 "github.com/aws/aws-sdk-go/aws"
session_sdkv1 "github.com/aws/aws-sdk-go/aws/session"
opsworks_sdkv1 "github.com/aws/aws-sdk-go/service/opsworks"
baselogging "github.com/hashicorp/aws-sdk-go-base/v2/logging"
"github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/hashicorp/terraform-provider-aws/internal/errs"
Expand Down Expand Up @@ -61,16 +59,6 @@ func (c *AWSClient) AwsConfig(context.Context) aws_sdkv2.Config { // nosemgrep:c
return c.awsConfig.Copy()
}

// OpsWorksConnForRegion returns an AWS SDK For Go v1 OpsWorks API client for the specified AWS Region.
// If the specified region is not the default a new "simple" client is created.
// This new client does not use any configured endpoint override.
func (c *AWSClient) OpsWorksConnForRegion(ctx context.Context, region string) *opsworks_sdkv1.OpsWorks {
if region == c.Region {
return c.OpsWorksConn(ctx)
}
return opsworks_sdkv1.New(c.session, aws_sdkv1.NewConfig().WithRegion(region))
}

// PartitionHostname returns a hostname with the provider domain suffix for the partition
// e.g. PREFIX.amazonaws.com
// The prefix should not contain a trailing period.
Expand Down
6 changes: 3 additions & 3 deletions internal/conns/awsclient_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 76b482c

Please sign in to comment.