From 45adecd9c9039650c36d66d5db7ebbd9e8394311 Mon Sep 17 00:00:00 2001 From: Daniel Carrillo Date: Wed, 23 Mar 2022 16:32:37 +0100 Subject: [PATCH] [aws] Add sso support --- modules/aws/init.zsh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/aws/init.zsh b/modules/aws/init.zsh index d23e412..4a13f39 100644 --- a/modules/aws/init.zsh +++ b/modules/aws/init.zsh @@ -9,6 +9,7 @@ zstyle -s ':prezto:module:aws' output '_aws_output' || _aws_output='table' zstyle -s ':prezto:module:aws' show_region '_aws_region' || _aws_region='false' zstyle -s ':prezto:module:aws' profile '_aws_profile' || _aws_profile='default' +zstyle -s ':prezto:module:aws' sso '_aws_sso' || _aws_sso='false' # Return if requirements are not found. if (( ! $+commands[aws] )); then @@ -163,6 +164,10 @@ function aws_switch_profile { else unset AWS_DEFAULT_REGION fi + + if [[ ${_aws_sso} == "true" ]]; then + eval $(aws-export-credentials --env-export) + fi fi }