terraform/vendor/github.com/hashicorp/aws-sdk-go-base
Brian Flad ba081aa10a
backend/s3: Updates for Terraform v0.13.0 (#25134)
* deps: Update github.com/hashicorp/aws-sdk-go-base@v0.5.0

Updated via:

```
$ go get github.com/hashicorp/aws-sdk-go-base@v0.5.0
$ go mod tidy
$ go mod vendor
```

* backend/s3: Updates for Terraform v0.13.0

Reference: https://github.com/hashicorp/terraform/issues/13410
Reference: https://github.com/hashicorp/terraform/issues/18774
Reference: https://github.com/hashicorp/terraform/issues/19482
Reference: https://github.com/hashicorp/terraform/issues/20062
Reference: https://github.com/hashicorp/terraform/issues/20599
Reference: https://github.com/hashicorp/terraform/issues/22103
Reference: https://github.com/hashicorp/terraform/issues/22161
Reference: https://github.com/hashicorp/terraform/issues/22601
Reference: https://github.com/hashicorp/terraform/issues/22992
Reference: https://github.com/hashicorp/terraform/issues/24252
Reference: https://github.com/hashicorp/terraform/issues/24253
Reference: https://github.com/hashicorp/terraform/issues/24480
Reference: https://github.com/hashicorp/terraform/issues/25056

Changes:

```
NOTES

* backend/s3: Deprecated `lock_table`, `skip_get_ec2_platforms`, `skip_requesting_account_id` arguments have been removed
* backend/s3: Credential ordering has changed from static, environment, shared credentials, EC2 metadata, default AWS Go SDK (shared configuration, web identity, ECS, EC2 Metadata) to static, environment, shared credentials, default AWS Go SDK (shared configuration, web identity, ECS, EC2 Metadata)
* The `AWS_METADATA_TIMEOUT` environment variable no longer has any effect as we now depend on the default AWS Go SDK EC2 Metadata client timeout of one second with two retries

ENHANCEMENTS

* backend/s3: Always enable shared configuration file support (no longer require `AWS_SDK_LOAD_CONFIG` environment variable)
* backend/s3: Automatically expand `~` prefix for home directories in `shared_credentials_file` argument
* backend/s3: Add `assume_role_duration_seconds`, `assume_role_policy_arns`, `assume_role_tags`, and `assume_role_transitive_tag_keys` arguments

BUG FIXES

* backend/s3: Ensure configured profile is used
* backend/s3: Ensure configured STS endpoint is used during AssumeRole API calls
* backend/s3: Prefer AWS shared configuration over EC2 metadata credentials
* backend/s3: Prefer ECS credentials over EC2 metadata credentials
* backend/s3: Remove hardcoded AWS Provider messaging
```

Output from acceptance testing:

```
--- PASS: TestBackend (16.32s)
--- PASS: TestBackendConfig (0.58s)
--- PASS: TestBackendConfig_AssumeRole (0.02s)
--- PASS: TestBackendConfig_conflictingEncryptionSchema (0.00s)
--- PASS: TestBackendConfig_invalidKey (0.00s)
--- PASS: TestBackendConfig_invalidSSECustomerKeyEncoding (0.00s)
--- PASS: TestBackendConfig_invalidSSECustomerKeyLength (0.00s)
--- PASS: TestBackendExtraPaths (13.21s)
--- PASS: TestBackendLocked (28.98s)
--- PASS: TestBackendPrefixInWorkspace (5.65s)
--- PASS: TestBackendSSECustomerKey (17.60s)
--- PASS: TestBackend_impl (0.00s)
--- PASS: TestForceUnlock (17.50s)
--- PASS: TestKeyEnv (50.25s)
--- PASS: TestRemoteClient (4.78s)
--- PASS: TestRemoteClientLocks (16.85s)
--- PASS: TestRemoteClient_clientMD5 (12.08s)
--- PASS: TestRemoteClient_impl (0.00s)
--- PASS: TestRemoteClient_stateChecksum (17.92s)
```
2020-06-05 16:41:32 -04:00
..
.golangci.yml backend/s3: Updates for Terraform v0.13.0 (#25134) 2020-06-05 16:41:32 -04:00
CHANGELOG.md backend/s3: Updates for Terraform v0.13.0 (#25134) 2020-06-05 16:41:32 -04:00
GNUmakefile deps: github.com/hashicorp/aws-sdk-go-base@v0.4.0 (#22994) 2019-10-11 12:50:12 -04:00
LICENSE backend/s3: Switch from github.com/terraform-providers/terraform-provider-aws to github.com/hashicorp/aws-sdk-go-base 2019-02-18 02:30:30 -05:00
README.md deps: github.com/hashicorp/aws-sdk-go-base@v0.4.0 (#22994) 2019-10-11 12:50:12 -04:00
awsauth.go backend/s3: Updates for Terraform v0.13.0 (#25134) 2020-06-05 16:41:32 -04:00
awserr.go backend/s3: Updates for Terraform v0.13.0 (#25134) 2020-06-05 16:41:32 -04:00
config.go backend/s3: Updates for Terraform v0.13.0 (#25134) 2020-06-05 16:41:32 -04:00
endpoints.go backend/s3: Updates for Terraform v0.13.0 (#25134) 2020-06-05 16:41:32 -04:00
errors.go backend/s3: Updates for Terraform v0.13.0 (#25134) 2020-06-05 16:41:32 -04:00
go.mod backend/s3: Updates for Terraform v0.13.0 (#25134) 2020-06-05 16:41:32 -04:00
go.sum backend/s3: Updates for Terraform v0.13.0 (#25134) 2020-06-05 16:41:32 -04:00
logger.go backend/s3: Switch from github.com/terraform-providers/terraform-provider-aws to github.com/hashicorp/aws-sdk-go-base 2019-02-18 02:30:30 -05:00
mock.go backend/s3: Updates for Terraform v0.13.0 (#25134) 2020-06-05 16:41:32 -04:00
session.go backend/s3: Updates for Terraform v0.13.0 (#25134) 2020-06-05 16:41:32 -04:00
validation.go deps: github.com/hashicorp/aws-sdk-go-base@v0.4.0 (#22994) 2019-10-11 12:50:12 -04:00

README.md

aws-sdk-go-base

An opinionated AWS Go SDK library for consistent authentication configuration between projects and 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 and the Terraform AWS Provider.

Requirements

Development

Testing this project can be done through Go standard library functionality or if Make is available:

$ go test -v ./...
# Optionally if Make is available; both run the same testing
$ make test

Code quality assurance uses golangci-lint:

$ golangci-lint run ./...
# Optionally if Make is available; both run the same linting
$ make lint