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

Cannot read from AWS instance IAM role for AWS provider (as of 5a15c02cbbea27d3f8345b5fe0f348a08a24fdb9) #2828

Closed
jszwedko opened this issue Jul 23, 2015 · 9 comments · Fixed by #2959

Comments

@jszwedko
Copy link
Contributor

It looks like the ability to read from an IAM instance role was lost for the AWS provider. This works fine in 0.6.1, but on the current HEAD of master I get:

Refreshing Terraform state prior to plan...

Error refreshing state: 1 error(s) occurred:

* 1 error(s) occurred:

* ValidationError: Must specify userName when calling with non-User credentials
        status code: 400, request id: [c3a9805f-30fe-11e5-b474-9f5062e1342d]
@jszwedko
Copy link
Contributor Author

I think this may be related to #2730 cc/ @catsby

@jszwedko jszwedko changed the title Cannot read from instance IAM role (as of 5a15c02cbbea27d3f8345b5fe0f348a08a24fdb9) Cannot read from AWS instance IAM role for AWS provider (as of 5a15c02cbbea27d3f8345b5fe0f348a08a24fdb9) Jul 23, 2015
@catsby
Copy link
Contributor

catsby commented Jul 23, 2015

Hey @jszwedko so, are the creds you're using are IAM creds then?

@catsby
Copy link
Contributor

catsby commented Jul 23, 2015

Hey @jszwedko yeah, so I made an IAM user and tested to confirm. I added the right privileges and the error went away...

@phinze thoughts on what to do here? #2730 attempts to simply fail earlier in the process, not sure if I should just revert it or maybe trap a specific error here :/

@jszwedko
Copy link
Contributor Author

@catsby aaah I see, so one fix would be to give the IAM role access to the IAM service.

@catsby
Copy link
Contributor

catsby commented Jul 29, 2015

aaah I see, so one fix would be to give the IAM role access to the IAM service.

@jszwedko can you confirm that worked for you?

@catsby
Copy link
Contributor

catsby commented Aug 7, 2015

Hey @jszwedko – #2959 should address this too

@jszwedko
Copy link
Contributor Author

jszwedko commented Aug 7, 2015

@catsby awesome, thank you. It turned out the IAM instance profile I was using already had permissions to hit the IAM service, but still errored. This issue persists in the now released 0.6.2.

@catsby
Copy link
Contributor

catsby commented Aug 7, 2015

yup, that's the then userName -> ValidationError thing when using a profile. Fixed in #2959 , thanks for following up!

@catsby catsby closed this as completed Aug 7, 2015
@ghost
Copy link

ghost commented May 1, 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 May 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants