-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[version 1.42] No valid credential sources found for AWS Provider. #6320
Comments
Hi @shifres 👋 Sorry you're running into trouble here. It might be very helpful to turn on Terraform debug logging in your scenario (e.g. There wasn't any intended changes to the provider and its authentication in this previous release so we may want to check the upstream AWS Go SDK changes to see if something occurred there as well. This one looks suspicious, but would also be very environment specific (two |
Thanks for the quick response @bflad
Let me know if there's anything further I can do in order to assist. |
I can reproduce with 1.42.0 and it works as expected using 1.41.0. I'm running Linux. Coworkers using Apple laptops do not experience the same problem. |
@tdewitt , can you reproduce the problem or you don't experience any problems with version 1.42 ? |
For reference, this is how the provider block is defined:
~/.aws/config:
~/.aws/credentials:
|
It'll be super useful for this issue to know how credentials are being sourced (e.g. environment variables, Out of curiosity, does it help to wrap your secret access key in quotes?
|
This is my workflow:
I just verified with the coworker who isn't having a problem (using an Apple) that he also has a forward slash in his secret key. Quoting the secret key doesn't change the behavior (still fails on my laptop). |
Just providing for reference that we have heard about some odd behavior with secret access keys that contain Antidotally, I've heard a case internally about this as well, but since there was an easy workaround (rotating your credentials) I never personally spent any time diving further into it. 😅 |
I've changed the
and my ~/.aws/credentials file format is:
|
Getting the error as well for 1.42
Manually setting the version to 1.41 works. |
I see similar error to @jhumbug when I setup |
I think |
I'm running this on a Mac laptop, high sierra 10.13.6, and I can reproduce this with AWS provider 1.42. AWS provider 1.41 works fine for me. |
@bflad in case it's helpful in resolving. We use https://github.com/turnerlabs/samlkeygen which populates our credentials file with temporary keys. For example:
|
Based on the comments, the closed upstream bug only resolves the issue for colons in section headers, not in values. But creds file values can contain colons - not only timestamps like the ones above from samlkeygen, but also role ARNs (which show up when you use a credentials profile to assume a role from another profile, as in @tedewitt's post above). |
aws/aws-sdk-go#2247 (pending release) seems to fix our issue. Hopefully that makes it into a v1.42.1 or v1.43.0 release. |
Version 1.43.0 of the AWS provider will include AWS Go SDK v1.15.68+, which contains both upstream INI parsing fixes. If there are still other problems with the parser, please continue to file them upstream. 👍 We're still tracking to release on our "normal" cadence middle of next week, but for visibility I'm actually going to keep this issue open until then even though the fixes may already be merged in case other issues emerge. |
Thanks @bflad for turning this around so quickly! And for all the awesome work you guys do!!! |
This has been released in version 1.43.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
@bflad Still encountering this on
My AWS credentials file contains |
@alienth I would suggest opening a SDK issue upstream (similar to aws/aws-sdk-go#2246) and a new tracking issue here as well. 👍 |
FYI, just locking this issue to encourage fresh bug reports if there are any more. 😄 |
Community Note
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Output
Expected Behavior
Shouldn't get
No valid credential sources found for AWS Provider.
errorSteps to Reproduce
run
terraform init --reconfigure
to download the latest provider.aws version:provider.aws: version = "~> 1.42"
terraform plan
Important Factoids
I'm running terraform locally and using a
~/.aws/credentials
file.When I lock the aws.provider version to 1.41 everything runs properly.
The text was updated successfully, but these errors were encountered: