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

Bad path for shared credentials file is ignored #18

Closed
mauriciovasquezbernal opened this issue Nov 12, 2019 · 1 comment
Closed

Bad path for shared credentials file is ignored #18

mauriciovasquezbernal opened this issue Nov 12, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@mauriciovasquezbernal
Copy link

Consider the following terraform file to be used with https://github.com/terraform-providers/terraform-provider-aws:

provider "aws" {
  version = "2.35.0"
  region = "us-west-2"
  shared_credentials_file = "path_to_some_non_existing_file"
}

If there is a valid credentials file at ~/.aws/credentials, terraform will use that instead of giving an error on the path_to_some_non_existing_file.

I tried to debug the problem a little bit and found out that ~/.aws/credentials is loaded in GetCredentialsFromSession when the loading of the credentials file fails.

creds, err = GetCredentialsFromSession(c)

I don't totally understand the logic behind this code so unfortunately I am not able to propose a solution. GetCredentialsFromSession was introduced in #5. @YakDriver could you please have a look?

@bflad bflad added the enhancement New feature or request label Jun 1, 2020
@bflad bflad self-assigned this Jun 1, 2020
@bflad bflad removed their assignment Aug 18, 2020
@gdavison gdavison added bug Something isn't working and removed enhancement New feature or request labels Jul 8, 2021
@gdavison
Copy link
Contributor

This has been resolved in v2 of aws-sdk-go-base

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants