Skip to content

Commit

Permalink
Merge pull request hashicorp#39913 from hashicorp/td-generators-remov…
Browse files Browse the repository at this point in the history
…e-aws-sdk-go-supported

Tech debt: Remove AWS SDK for Go v1 support from `internal/generate/tags`
  • Loading branch information
ewbankkit authored Oct 28, 2024
2 parents afc50a0 + cdba5de commit 571e4d8
Show file tree
Hide file tree
Showing 151 changed files with 409 additions and 2,315 deletions.
10 changes: 0 additions & 10 deletions docs/resource-tagging.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,6 @@ For more details on flags for generating tag updating functions, see the
When creating a resource, some AWS APIs support passing tags in the Create call while others require setting the tags after the initial creation.
If the API does not support tagging on creation, pass the `-CreateTags` flag to generate a `createTags` function that can be called from the resource Create handler function.

### Specifying the AWS SDK for Go version

The majority of the Terraform AWS Provider is implemented using [version 2 of the AWS SDK for Go](https://github.com/aws/aws-sdk-go-v2).
Some services, however, are only present in [version 1 of the SDK](https://github.com/aws/aws-sdk-go).

By default, the generated code uses the AWS SDK for Go v2.
To generate code using the AWS SDK for Go v1, pass the flag `-AwsSdkVersion=1`.

For more information, see the [documentation on AWS SDK versions](./aws-go-sdk-versions.md).

### Running Code generation

Run the command `make gen` to run the code generators for the project.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: MPL-2.0
// Code generated by internal/generate/namevaluesfilters/v2/main.go; DO NOT EDIT.

package v2
package namevaluesfilters

import ( // nosemgrep:ci.semgrep.aws.multiple-service-imports
"github.com/aws/aws-sdk-go-v2/aws"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"text/template"

"github.com/hashicorp/terraform-provider-aws/internal/generate/common"
namevaluesfiltersv2 "github.com/hashicorp/terraform-provider-aws/internal/namevaluesfilters/v2"
namevaluesfilters "github.com/hashicorp/terraform-provider-aws/internal/namevaluesfilters"
"github.com/hashicorp/terraform-provider-aws/names"
)

Expand Down Expand Up @@ -43,12 +43,12 @@ func main() {
SliceServiceNames: sliceServiceNames,
}
templateFuncMap := template.FuncMap{
"FilterPackage": namevaluesfiltersv2.ServiceFilterPackage,
"FilterPackagePrefix": namevaluesfiltersv2.ServiceFilterPackagePrefix,
"FilterType": namevaluesfiltersv2.ServiceFilterType,
"FilterTypeNameField": namevaluesfiltersv2.ServiceFilterTypeNameField,
"FilterTypeNameFunc": namevaluesfiltersv2.ServiceFilterTypeNameFunc,
"FilterTypeValuesField": namevaluesfiltersv2.ServiceFilterTypeValuesField,
"FilterPackage": namevaluesfilters.ServiceFilterPackage,
"FilterPackagePrefix": namevaluesfilters.ServiceFilterPackagePrefix,
"FilterType": namevaluesfilters.ServiceFilterType,
"FilterTypeNameField": namevaluesfilters.ServiceFilterTypeNameField,
"FilterTypeNameFunc": namevaluesfilters.ServiceFilterTypeNameFunc,
"FilterTypeValuesField": namevaluesfilters.ServiceFilterTypeValuesField,
"ProviderNameUpper": names.ProviderNameUpper,
}

Expand Down
532 changes: 34 additions & 498 deletions internal/generate/tags/README.md

Large diffs are not rendered by default.

34 changes: 0 additions & 34 deletions internal/generate/tags/README_keyvaluetags.md

This file was deleted.

106 changes: 0 additions & 106 deletions internal/generate/tags/README_listtags.md

This file was deleted.

123 changes: 0 additions & 123 deletions internal/generate/tags/README_servicetags.md

This file was deleted.

Loading

0 comments on commit 571e4d8

Please sign in to comment.