-
Notifications
You must be signed in to change notification settings - Fork 54
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
Support AWS SSO #27
Comments
Hi @iainelder, I will upgrade the Terraform Provider and let you know once done. Thanks for filing the issue! |
Hi @iainelder again, I upgraded the Terraform AWS Provider in the new release: v0.9.0. Please let me know if SSO is working now for you. Thanks. |
I installed v0.9.0. I see in the linked PR there a line that refers to v3.31.0 of the AWS provider. Line 30 in c19a9da
However, it appears that v3.16.0 is still being used. It still appears in the same error message.
|
sry for that, next try 🙂 The line you are referring to is part of the generator (based on which the list functions are generated - that's why there are +10 supported resources in the new release). I thought I had changed the provider version also in the main.go (https://github.com/jckuester/awsls/blob/master/main.go#L165), but somehow didn't. It should work now 🤞 v0.9.1 is on it's way... (https://github.com/jckuester/awsls/actions/runs/627770504) |
I installed v0.9.1 and tried again with AWS SSO. This time it produces a weird error about failing to get the identity.
For comparison here is what the AWS CLI v2 returns for the caller identity.
It looks the error originates from the client's SetAccountID function (just a guess from searching for the error message in the repo). Lines 84 to 95 in 196ade0
|
Ok, I think this makes sense. I assume that I also need to upgrade to a higher AWS SDK version (latest: https://github.com/aws/aws-sdk-go-v2/releases/tag/v1.2.0), which supports SSO. I will come back to you with a PR. |
According to go.mod, awsls is currently using aws-sdk-go v1.35.28. Line 7 in 6949109
It looks like you can stay on v1 and still use SSO. From a comment in the provider issue, it looks like SSO support was introduced in v1.37.0. hashicorp/terraform-provider-aws#10851 (comment) aws/aws-sdk-go#3755 (AWS Single Sign-On (SSO) Provider Support) Just mentioning it in case upgrading to v2 of the SDK would require other API changes to stay compatible. |
Unfortunately, I am using aws-sdk-go-v2 in version 0.24 for The change of using the v2 API in the first stable release is a bigger change and I have now a working PR: #29. Can you build the PR and check if it is working with SSO? If so, I will continue with some more refactoring and clean ups. |
Sure, but I need your help! How do you build it? I don't see instructions in the README, so I've guessed. I'm using my own script in a container running ubuntu-20.04 to install the prequisites and build awsls. It uses the I've copied the complete output of There appear several errors about missing Terraform:
Is Terraform not compiled into the executable?
|
Sorry for not giving you more details. |
Okay! I'll try it when I get a moment. That might be obvious to a gopher, but I'm new to the Go ecosystem. Thanks for your patience |
Yes, my build from branch #29 can use my SSO profile!
Thanks for your work on this. When can we expect this to get a proper release? |
Hi @iainelder, sorry for my late response. I'll try to do my best and let you know; I haven't found much time yet to finish the needed refactoring properly. |
No problem. We have day jobs and lives away from the kyeboard too 😄 In the meantime I can use my dev build. |
Hi @iainelder, thanks for your patience here :) I am almost done and hope to make a release tonight for this PR (including also the JSON output feature and the bug you reported about redownloading the Terraform provider). |
Thanks for the effort on this! Looking forward to the new features :-) |
Finally released in v0.10.0. There was a failing test that needed to be fixed, which delayed the release again, sorry. If you have the chance to spread the word about the new |
@jckuester Thanks! I'll check as soon as I can and let you know. awsls is a great tool for ad-hoc inventory analysis, and I recommend it to everyone I work with when it's appropriate to do so :-) |
@jckuester The SSO support is working great in v0.10.0. Thanks so much for the work! |
I have this profile that uses AWS SSO (configured using the AWS CLI v2
aws configure sso
command):I run any query using the profile:
I get this error.
The Terraform aws provider version is 3.16.0. It doesn't support AWS SSO.
AWS SSO support was introduced in 3.26.0. See hashicorp/terraform-provider-aws#10851 (comment)
Preferrably use the latest version of the provider to avoid any initial bugs when AWS SSO support was introduced.
The text was updated successfully, but these errors were encountered: