Skip to content

Commit

Permalink
changing AWS_SECURITY_TOKEN to AWS_SESSION_TOKEN (#8816)
Browse files Browse the repository at this point in the history
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!
  • Loading branch information
ksatirli authored and catsby committed Sep 13, 2016
1 parent 9c71ada commit 566d18a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ provider "aws" {

You can provide your credentials via `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`,
environment variables, representing your AWS Access Key and AWS Secret Key, respectively.
`AWS_DEFAULT_REGION` and `AWS_SECURITY_TOKEN` are also used, if applicable:
`AWS_DEFAULT_REGION` and `AWS_SESSION_TOKEN` are also used, if applicable:

```
provider "aws" {}
Expand Down

0 comments on commit 566d18a

Please sign in to comment.