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

changing AWS_SECURITY_TOKEN to AWS_SESSION_TOKEN #8816

Merged
merged 1 commit into from
Sep 13, 2016
Merged

changing AWS_SECURITY_TOKEN to AWS_SESSION_TOKEN #8816

merged 1 commit into from
Sep 13, 2016

Conversation

ksatirli
Copy link
Member

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:

SessionToken: os.Getenv("AWS_SESSION_TOKEN"),
, 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!
@catsby
Copy link
Contributor

catsby commented Sep 13, 2016

This looks correct, thanks for spotting it!

@catsby catsby merged commit dfb85fb into hashicorp:master Sep 13, 2016
catsby pushed a commit that referenced this pull request Sep 13, 2016
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!
@ksatirli
Copy link
Member Author

My pleasure, @catsby!

Thanks for the quick merge.

@ksatirli ksatirli deleted the patch-2 branch September 14, 2016 06:40
ojongerius added a commit to atlassian/terraform that referenced this pull request Sep 14, 2016
…ull_window

* upstream/master: (31 commits)
  core: Log local overrides as INFO rather than WARN
  provider/aws: Retry resourceAwsLaunchConfigurationCreate if instance profile hasn't propagated (hashicorp#8813)
  changing AWS_SECURITY_TOKEN to AWS_SESSION_TOKEN (hashicorp#8816)
  Update ses_receipt_rule_set.html.markdown
  Warn when plugins are locally overridden
  Fix a typo in the output command examples
  aws_instance doc: fix attachment resource name
  Vendored WAF (hashicorp#8785)
  update github.com/hashicorp/go-getter
  Update CHANGELOG.md
  provider/azurerm: Removing the diagnostics part of the test from the azurerm virtual machine unattended acceptance test
  Update CHANGELOG.md
  Update CHANGELOG.md
  provider/aws: Removal of  test for changes as it forces a new resource
  provider/aws: Allow `aws_alb` to have the name auto-generated
  Update CHANGELOG.md
  Remove Unused Log From CodeCommit Trigger Test
  provider/aws: Support Policy DiffSuppression in `aws_kms_key` policy
  Update CHANGELOG.md
  provider/cloudstack: fix vpc renaming (hashicorp#8784)
  ...
@ghost
Copy link

ghost commented Apr 22, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants