Created
January 10, 2020 17:26
-
-
Save brodygov/00f3c128ec362552711307045635d4e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
# shellcheck source=/dev/null | |
. "$(dirname "$0")/lib/common.sh" | |
usage() { | |
cat >&2 <<EOM | |
usage: $(basename "$0") ENVIRONMENT | |
Print the IDP and app RDS instance endpoints for ENVIRONMENT. | |
EOM | |
} | |
if [ $# -lt 1 ]; then | |
usage | |
exit 1 | |
fi | |
env="$1" | |
run aws rds describe-db-instances \ | |
--filters "Name=db-instance-id,Values=login-$env-idp,login-$env" \ | |
--query DBInstances[*].Endpoint.Address # --output text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment