Skip to content

Instantly share code, notes, and snippets.

@brodygov
Created January 10, 2020 17:26
Show Gist options
  • Save brodygov/00f3c128ec362552711307045635d4e9 to your computer and use it in GitHub Desktop.
Save brodygov/00f3c128ec362552711307045635d4e9 to your computer and use it in GitHub Desktop.
#!/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