aws:bash-read-in-values
This is an old revision of the document!
BASH read in values to script
#!/bin/bash # Control to disable - read in as argument # CONTROL_ID='IAM.9' CONTROL_ID=$1 if [ -z ${CONTROL_ID} ]; then echo "Please give control id as a parameter, eg ./disable_check.sh IAM.x"; exit 1 fi echo "Set a profile with the AWS SSO:-" echo "aws configure sso --use-device-code" echo "profile name needs to be 'OrgDeployRole' " read -p "Is this set (y / n)? " yn case $yn in y|yes ) echo "ok, using control:- ${CONTROL_ID}";; n|no ) echo "exiting... You need to set this up."; exit;; * ) echo invalid response; exit 1;; esac THIS_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
aws/bash-read-in-values.1758207272.txt.gz · Last modified: by andrew
