No description
  • Go 99.5%
  • Groovy 0.3%
  • Makefile 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Graham Davison 06a50b0b23
Merge pull request #1498 from hashicorp/td-golangcilint-v2
Updates `golangci-lint` to v2
2026-07-22 12:10:39 -07:00
.github Updates golangci-lint to v2 2026-07-22 11:21:07 -07:00
.semgrep [COMPLIANCE] Add/Update Copyright Headers 2026-05-11 04:49:33 +00:00
configtesting [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 1) 2025-12-05 04:58:12 +00:00
diag [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 1) 2025-12-05 04:58:12 +00:00
endpoints Run make gen. 2026-05-26 09:54:04 -04:00
internal Fixes goconst 2026-07-22 10:57:40 -07:00
logging [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 1) 2025-12-05 04:58:12 +00:00
META.d [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 1) 2025-12-05 04:58:12 +00:00
mockdata [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 1) 2025-12-05 04:58:12 +00:00
servicemocks Removes nolint for non-existent linter 2026-07-22 10:58:14 -07:00
tfawserr [COMPLIANCE] Add/Update Copyright Headers 2026-05-11 04:49:33 +00:00
tools Updates golangci-lint to v2 2026-07-22 11:21:07 -07:00
useragent [COMPLIANCE] Add/Update Copyright Headers 2026-05-11 04:49:33 +00:00
v2/awsv1shim Merge pull request #1498 from hashicorp/td-golangcilint-v2 2026-07-22 12:10:39 -07:00
validation [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 1) 2025-12-05 04:58:12 +00:00
.golangci.yml Exclude io functions from errcheck 2026-07-22 10:58:11 -07:00
.markdownlint.yml [COMPLIANCE] Add/Update Copyright Headers 2026-05-11 04:49:33 +00:00
.semgrepignore Merge branch 'main' into b-proxy-config 2023-11-10 18:04:50 -08:00
aws_config.go Fixes staticcheck 2026-07-22 10:57:29 -07:00
aws_config_test.go Merge pull request #1498 from hashicorp/td-golangcilint-v2 2026-07-22 12:10:39 -07:00
awsauth.go Fixes goconst 2026-07-22 10:57:40 -07:00
awsauth_test.go [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 1) 2025-12-05 04:58:12 +00:00
CHANGELOG.md Prepare for v2.0.0-beta.73 release. 2026-05-26 10:01:35 -04:00
clients.go [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 1) 2025-12-05 04:58:12 +00:00
config.go [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 1) 2025-12-05 04:58:12 +00:00
credentials.go Fixes staticcheck 2026-07-22 10:57:29 -07:00
credentials_test.go [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 1) 2025-12-05 04:58:12 +00:00
endpoints.go [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 1) 2025-12-05 04:58:12 +00:00
errors.go [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 1) 2025-12-05 04:58:12 +00:00
errors_test.go [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 1) 2025-12-05 04:58:12 +00:00
GNUmakefile Updates golangci-lint to v2 2026-07-22 11:21:07 -07:00
go.mod Merge pull request #1498 from hashicorp/td-golangcilint-v2 2026-07-22 12:10:39 -07:00
go.sum Merge pull request #1498 from hashicorp/td-golangcilint-v2 2026-07-22 12:10:39 -07:00
go.work Run 'go work sync'. 2026-03-02 09:48:16 -05:00
go.work.sum Undelete 'go.work.sum'. 2026-03-20 12:36:36 -04:00
http_client.go [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 1) 2025-12-05 04:58:12 +00:00
http_client_test.go [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 1) 2025-12-05 04:58:12 +00:00
LICENSE [COMPLIANCE] Update MPL 2.0 LICENSE 2022-10-12 20:46:59 +00:00
logger.go [COMPLIANCE] Add/Update Copyright Headers 2026-05-11 04:49:33 +00:00
README.md Document Go compatibility. 2025-12-16 14:32:34 -05:00
s3attributes_test.go [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 1) 2025-12-05 04:58:12 +00:00
user_agent.go [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 1) 2025-12-05 04:58:12 +00:00
user_agent_test.go [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 1) 2025-12-05 04:58:12 +00:00

aws-sdk-go-base

An opinionated AWS SDK for Go v2 library for consistent authentication configuration between projects plus additional helper functions. This library was originally started in HashiCorp Terraform, migrated with the Terraform AWS Provider during the Terraform 0.10 Core and Provider split, and now is offered as a separate library to allow easier dependency management in the Terraform ecosystem.

NOTE: This library is not currently designed or intended for usage outside the Terraform S3 Backend, the Terraform AWS Provider, and the Terraform AWS Cloud Control Provider.

This project publishes two Go modules, aws-sdk-go-base/v2 and aws-sdk-go-base/v2/awsv1shim/v2. The module aws-sdk-go-base/v2 returns configuration compatible with the AWS SDK for Go v2. In order to assist with migrating large code bases using the AWS SDK for Go v1, the module aws-sdk-go-base/v2/awsv1shim/v2 takes the AWS SDK for Go v2 configuration and returns configuration for the AWS SDK for Go v1.

Go Compatibility

This project follows the support policy of Go as its support policy. The two latest major releases of Go are supported by the project.

Currently, that means Go 1.24 or later must be used when including this project as a dependency.

Development

Running make test will test both aws-sdk-go-base/v2 and aws-sdk-go-base/v2/awsv1shim/v2. To test individual cases, go test works as well, but be aware that it only works in the current module. To test both modules, run:

$ go test -v ./...
$ cd v2/awsv1shim && go test -v ./...

Code is validated using golangci-lint for general code quality, impi for import block formatting, and Semgrep to validate additional rules.

golangci-lint and impi are Go tools, and can be installed using either make tools or installing the Go packages. Installing the packages from the tools directory will ensure that you are using the expected version. Semgrep can be installed as described in the documentation or using a Docker container.

Validation can be run using make lint to run golangci-lint and impi. make semgrep will run Semgrep using a Docker container.

If running linters directly, be aware that golangci-lint will only run for the current module. To validate both modules, run:

$ golangci-lint run ./...
$ cd v2/awsv1shim && golangci-lint run ./...

Release Process

The two modules can be released separately. If changes are only made to awsv1shim, aws-sdk-go-base should not be released. However, if changes are made to aws-sdk-go-base, both modules should be released.

  1. If creating a new release of aws-sdk-go-base
    1. Update the reference in the awsv1shim go.mod file
    2. Run go mod tidy
  2. Update the CHANGELOG.md file
  3. Push the updated files to GitHub
  4. Push new version tags to GitHub. For more details on Go module versioning, see https://go.dev/doc/modules/version-numbers. (Commands git tag -a -m "" <version tag>, git push --tags)
    • For aws-sdk-go-base, use the form vX.Y.Z
    • For awsv1shim, use the form v2/awsv1shim/vX.Y.Z
  5. Close the associated GitHub milestone
  6. Create the releases on GitHub

AWS SDK Upgrade Policy

aws-sdk-go-base will only upgrade AWS SDKs as needed to bring in bug fixes or required enhancements. This leaves software making use of this module free to manage their own SDK versions.