-
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
[WIP] Fix assuming role via ".aws/config" #1590
Conversation
Hey @svenwltr It makes sense for Terraform to support assuming roles via Have you looked into the SDK and considered raising a PR there? |
Hey @radeksimko, the SDK is already able to do this, as I wrote in the actual issue: sess, err := session.NewSessionWithOptions(session.Options{
Config: aws.Config{
Region: "my-region",
},
SharedConfigState: session.SharedConfigEnable,
Profile: "my-profile",
}) I did it the manual way, because Terraform already does more manually than necessary, which confused me a bit. I also strongly prefer to use the SDKs ability. Also I am very fine, if we go with the PR #1608, which solves the same problem in another way. |
Ah, I see - sorry I didn't read the whole conversation there. 🙈
It will probably need some tests & more thorough review, but it's more in-line with what we're discussing here. What do you think? |
I should read more before posting comments, clearly...
Cool. With that are you happy for me to close this PR? |
Yeah, the issues and PRs got a bit messed up :-) Ok, it looks like we're on the same line here. Therefore I close this in favor of #1608. |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
This PR allows assuming roles via shared configuration
~/.aws/config
. It still supports assuming other roles for different provider configurations afterwards.I am somehow not fully satisfied with the code yet, so feel free to nitpick everything.
Open Questions
aws sts assume-role
manually anyway, so it shouldn't be affected by this change.