Update dpsql function and add dpsqluri function

This commit is contained in:
Pavle Portic 2023-01-11 14:41:35 +01:00
parent 006281631c
commit b9036c5058
Signed by: TheEdgeOfRage
GPG Key ID: 66AD4BA646FBC0D2
2 changed files with 6 additions and 1 deletions

View File

@ -1,4 +1,4 @@
# vim: ft=zsh
# connect to dune RDS instance
PGPASSWORD=$(aws secretsmanager get-secret-value --secret-id ${1}_${2}_db_${2}_user_password --output text --query SecretString) psql -U ${2} -h ${1}-${2}-db.dune.com.beta.tailscale.net ${2}
PGPASSWORD=$(aws secretsmanager get-secret-value --secret-id ${1}_${2}_db_${2}_user_password --output text --query SecretString) psql -U ${2} -h ${1}-${2}-db.tailf3b9f.ts.net ${2}

View File

@ -0,0 +1,5 @@
# vim: ft=zsh
# connect to dune RDS instance
PGPASSWORD=$(aws secretsmanager get-secret-value --secret-id ${1}_${2}_db_${2}_user_password --output text --query SecretString)
echo "postgres://${2}:${PGPASSWORD}@${1}-${2}-db.tailf3b9f.ts.net/${2}?sslmode=disable"