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/aws: Provide a better message if no AWS creds are found #4869

Merged
merged 2 commits into from
Jan 29, 2016

Conversation

catsby
Copy link
Contributor

@catsby catsby commented Jan 27, 2016

$ terraform apply 
Error refreshing state: 1 error(s) occurred:

* 1 error(s) occurred:

* No valid credential sources found for AWS Provider.
  Please see https://terraform.io/docs/providers/aws/index.html for more information on
  providing credentials for the AWS Provider

@radeksimko
Copy link
Member

👍

aws/aws-sdk-go#512 should allow us to give users more details about where the credentials come from - helpful for further debugging. I'll probably send something in a separate PR.

`AWS_SECRET_ACCESS_KEY` environment variables. Lastly, if those are not found
it will look for credentials in the default location for a credentials file, or
the file path specified in the `shared_credentials_file` attribute of the
`provider` block.
Copy link
Contributor

Choose a reason for hiding this comment

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

The shared credentials path can be overridden with AWS_SHARED_CREDENTIALS_FILE

And the creds file can have multiple profiles, which can be selected via profile, which can also be set via AWS_PROFILE.

https://github.com/aws/aws-sdk-go/blob/87b1e60a50b09e4812dee560b33a238f67305804/aws/credentials/shared_credentials_provider.go#L25-L36

I wonder if this would look clearer as a numbered list of "things we check in this order" than a prose paragraph?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wonder if this would look clearer as a numbered list of "things we check in this order" than a prose paragraph?

probably, will do

@phinze
Copy link
Contributor

phinze commented Jan 28, 2016

Big 👍 for getting a link to website docs in this error message - that way we can continue to improve that message as we learn more about what's helpful to users.

Made some comments on the initial contents of the website message above inline.

@phinze
Copy link
Contributor

phinze commented Jan 29, 2016

LGTM

catsby added a commit that referenced this pull request Jan 29, 2016
provider/aws: Provide a better message if no AWS creds are found
@catsby catsby merged commit b7582fa into master Jan 29, 2016
@catsby catsby deleted the b-aws-provider-auth-docs branch January 29, 2016 15:25
@ghost
Copy link

ghost commented Apr 28, 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 28, 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