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

provider: Add environment variable support for DynamoDB, IAM, S3, STS endpoints #23052

Merged
merged 3 commits into from
Feb 9, 2022

Conversation

gdavison
Copy link
Contributor

@gdavison gdavison commented Feb 9, 2022

Adds environment variables to override AWS API endpoints for parity with the S3 backend:

  • TF_AWS_DYNAMODB_ENDPOINT
  • TF_AWS_IAM_ENDPOINT
  • TF_AWS_S3_ENDPOINT
  • TF_AWS_STS_ENDPOINT

New and already deprecated environment variables (hashicorp/terraform#30479)

  • AWS_DYNAMODB_ENDPOINT
  • AWS_IAM_ENDPOINT
  • AWS_S3_ENDPOINT
  • AWS_STS_ENDPOINT

Closes #23025

Test results

$ go test ./internal/provider/... -v

=== RUN   TestExpandEndpoints
--- PASS: TestExpandEndpoints (0.00s)
=== RUN   TestEndpointMultipleKeys
--- PASS: TestEndpointMultipleKeys (0.01s)
=== RUN   TestEndpointEnvVarPrecedence
2022/02/08 17:39:13 [WARN] The environment variable "AWS_STS_ENDPOINT" is deprecated. Use "TF_AWS_STS_ENDPOINT" instead.
--- PASS: TestEndpointEnvVarPrecedence (0.01s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/provider	1.052s

@github-actions github-actions bot added client-connections Pertains to the AWS Client and service connections. documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/L Managed by automation to categorize the size of a PR. labels Feb 9, 2022
@gdavison gdavison added this to the v4.0.0 milestone Feb 9, 2022
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

% go test ./internal/provider  
ok  	github.com/hashicorp/terraform-provider-aws/internal/provider	1.511s

@gdavison gdavison merged commit 1cd3073 into main Feb 9, 2022
@gdavison gdavison deleted the endpoint-envvars branch February 9, 2022 17:46
@github-actions
Copy link

This functionality has been released in v4.0.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
client-connections Pertains to the AWS Client and service connections. documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

provider: Add environment variable support for DynamoDB, IAM, S3, STS endpoints
2 participants