aws-cli: Updated the config with tools for saml login
This commit is contained in:
parent
373652f6b9
commit
927e0c5407
4 changed files with 32 additions and 7 deletions
17
.bashrc.d/aws-azure-login.sh
Normal file
17
.bashrc.d/aws-azure-login.sh
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# If aws-azure-login is not installed do nothing
|
||||||
|
if ! command -v aws-azure-login >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
# In WSL the no-sandbox parameter is mandatory for aws-azure-login to function
|
||||||
|
# correctly
|
||||||
|
if truthy $DOTFILES_WSL
|
||||||
|
then
|
||||||
|
alias aws-azure-login="aws-azure-login --no-sandbox"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Make it so I just have to type a command and the (optionally) a profile
|
||||||
|
function aws-token {
|
||||||
|
aws-azure-login --no-prompt ${1:+--profile $1}
|
||||||
|
}
|
|
@ -32,18 +32,18 @@ if [[ $checksum != $DOTFILES_INSTALL_CHECKSUM ]]; then
|
||||||
echo "Dotfiles: Downloading vim-plug..."
|
echo "Dotfiles: Downloading vim-plug..."
|
||||||
if curl \
|
if curl \
|
||||||
--fail \
|
--fail \
|
||||||
--location \
|
--location \
|
||||||
--retry 5 \
|
--retry 5 \
|
||||||
--retry-delay 1 \
|
--retry-delay 1 \
|
||||||
--create-dirs \
|
--create-dirs \
|
||||||
--progress-bar \
|
--progress-bar \
|
||||||
--output ~/.local/share/nvim/site/autoload/plug.vim \
|
--output ~/.local/share/nvim/site/autoload/plug.vim \
|
||||||
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
then
|
then
|
||||||
echo "Dotfiles: Done"
|
echo "Dotfiles: Done"
|
||||||
else
|
else
|
||||||
echo "Dotfiles: Error downloading vim-plug"
|
echo "Dotfiles: Error downloading vim-plug"
|
||||||
dotfiles_install_error="yes"
|
dotfiles_install_error="yes"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
AWS_PROFILE=default-role
|
AWS_DEFAULT_REGION=eu-central-1
|
||||||
AWS_DEFAULT_REGION=eu-west-1
|
|
||||||
AWS_DEFAULT_OUTPUT=json
|
AWS_DEFAULT_OUTPUT=json
|
||||||
|
|
||||||
|
AZURE_APP_ID_URI=https://signin.aws.amazon.com/saml
|
||||||
|
AZURE_DEFAULT_DURATION_HOURS=12
|
||||||
|
|
6
.environment.d/wsl.env
Normal file
6
.environment.d/wsl.env
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
if [[ $OSTYPE == linux-gnu && $(< /proc/sys/kernel/osrelease) == *Microsoft ]]
|
||||||
|
then
|
||||||
|
DOTFILES_WSL=true
|
||||||
|
else
|
||||||
|
DOTFILES_WSL=false
|
||||||
|
fi
|
Loading…
Add table
Add a link
Reference in a new issue