diff options
author | Nicholas Hawkes <nicholas.hawkes@prodigygame.com> | 2021-11-27 15:34:47 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-27 12:34:47 -0800 |
commit | bf303965e685489f2f1b764d5d22dc4766ca78c8 (patch) | |
tree | 57e5b26a34daa578efd1edf2698389de410f74db /plugins | |
parent | 58478d0888aa842adc71aded80009cba5be190ec (diff) | |
download | zsh-bf303965e685489f2f1b764d5d22dc4766ca78c8.tar.gz zsh-bf303965e685489f2f1b764d5d22dc4766ca78c8.tar.bz2 zsh-bf303965e685489f2f1b764d5d22dc4766ca78c8.zip |
feat(aws): Adds the login option for AWS SSO (#9921)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/aws/README.md | 1 | ||||
-rw-r--r-- | plugins/aws/aws.plugin.zsh | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/plugins/aws/README.md b/plugins/aws/README.md index 011bbd8b4..24c6429dd 100644 --- a/plugins/aws/README.md +++ b/plugins/aws/README.md @@ -14,6 +14,7 @@ plugins=(... aws) * `asp [<profile>]`: sets `$AWS_PROFILE` and `$AWS_DEFAULT_PROFILE` (legacy) to `<profile>`. It also sets `$AWS_EB_PROFILE` to `<profile>` for the Elastic Beanstalk CLI. Run `asp` without arguments to clear the profile. +* `asp [<profile>] login`: If AWS SSO has been configured in your aws profile, it will run the `aws sso login` command following profile selection. * `acp [<profile>]`: in addition to `asp` functionality, it actually changes the profile by assuming the role specified in the `<profile>` configuration. It supports MFA and sets diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh index 2d095635b..3a3a111b4 100644 --- a/plugins/aws/aws.plugin.zsh +++ b/plugins/aws/aws.plugin.zsh @@ -21,6 +21,10 @@ function asp() { export AWS_DEFAULT_PROFILE=$1 export AWS_PROFILE=$1 export AWS_EB_PROFILE=$1 + + if [[ "$2" == "login" ]]; then + aws sso login + fi } # AWS profile switch |