-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
aws: re-introduce support for AWS_SECURITY_TOKEN #1785
Conversation
Do you know that this variable name is deprecated? |
I understand there is a new standard way for AWS environment variables. For previous versions of terraform, AWS_SECURITY_TOKEN was documented as the variable for session tokens. |
I agree that despite deprecation, Terraform should support all old and new. |
(Its just a free trade for support, it doesn't cost us anything and it makes the UX better for users that still use the old value) |
aws: re-introduce support for AWS_SECURITY_TOKEN
I noticed that Terraform is not (anymore) parsing the value of environment variable `AWS_SECURITY_TOKEN` (which was re-added in May 2015: #1785) Example ENV: ``` AWS_SECURITY_TOKEN="FQo...vgU=" AWS_ACCESS_KEY_ID="A...A" AWS_SECRET_ACCESS_KEY="I...t" AWS_DEFAULT_REGION="eu-west-1" ``` This errors with messages akin to "AWS was not able to validate the provided access credentials". Setting `AWS_SESSION_TOKEN` instead of `AWS_SECURITY_TOKEN` on the other hand works just fine and seems to be in line with what is suggested in the code: https://github.com/hashicorp/terraform/blob/d1ac7d3b2e1be2f32092275340f33a2d73f7b31a/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go#L69, making this whole thing a documentation change. Happy to provide test cases or additional insights though!
I noticed that Terraform is not (anymore) parsing the value of environment variable `AWS_SECURITY_TOKEN` (which was re-added in May 2015: #1785) Example ENV: ``` AWS_SECURITY_TOKEN="FQo...vgU=" AWS_ACCESS_KEY_ID="A...A" AWS_SECRET_ACCESS_KEY="I...t" AWS_DEFAULT_REGION="eu-west-1" ``` This errors with messages akin to "AWS was not able to validate the provided access credentials". Setting `AWS_SESSION_TOKEN` instead of `AWS_SECURITY_TOKEN` on the other hand works just fine and seems to be in line with what is suggested in the code: https://github.com/hashicorp/terraform/blob/d1ac7d3b2e1be2f32092275340f33a2d73f7b31a/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go#L69, making this whole thing a documentation change. Happy to provide test cases or additional insights though!
I noticed that Terraform is not (anymore) parsing the value of environment variable `AWS_SECURITY_TOKEN` (which was re-added in May 2015: hashicorp/terraform#1785) Example ENV: ``` AWS_SECURITY_TOKEN="FQo...vgU=" AWS_ACCESS_KEY_ID="A...A" AWS_SECRET_ACCESS_KEY="I...t" AWS_DEFAULT_REGION="eu-west-1" ``` This errors with messages akin to "AWS was not able to validate the provided access credentials". Setting `AWS_SESSION_TOKEN` instead of `AWS_SECURITY_TOKEN` on the other hand works just fine and seems to be in line with what is suggested in the code: https://github.com/hashicorp/terraform/blob/d1ac7d3b2e1be2f32092275340f33a2d73f7b31a/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go#L69, making this whole thing a documentation change. Happy to provide test cases or additional insights though!
I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
This re-enables support for the AWS_SECURITY_TOKEN environmental variable for AWS session tokens.