Configurable defaults for sso_start_url and sso_region in `aws configure sso`
Currently, aws configure sso is able to scan over the config file and pick up existing values of sso_start_url and sso_region, but the default (hitting enter) sets it to none. This is almost never useful when setting up a profile for AWS SSO. I would like the ability to set a default value for this, perhaps through environment variables, so that when I'm configuring a profile for AWS SSO, and I'm using my most-used AWS SSO provider (and I imagine that most folks only have one anyway), I can just hit enter on those first two and get to the meat of the profile config, the account and role name.
I created a small shell script to do this: https://gist.github.com/benkehoe/73534b3f59e7ea7de18a1d712173ce07
I still want it natively in the CLI ;-)
Hi @benkehoe , thanks for the request, could you also make this as a PR ?
I can try! From what I can tell, in awscli.customizations.sso I would need to add another parameter, something like default_value, to both PTKPrompt.get_valueand ConfigureSSOCommand._prompt_for, and then use those parameters in ConfigureSSOCommand._prompt_for_start_url and _prompt_for_sso_region. I note that there's actually a comment in the code, "TODO: figure out a way to get a list of reasonable client regions" so this isn't a new idea!
There is still no way to set defaults when configuring aws sso to avoid prompting?
There is still no way to set defaults when configuring aws sso to avoid prompting?
Seems so, it's kinda weird that we can't set this as an env variable. Would be nice to be able to configure new profiles (we create new accounts often) with organisation defaults.