Pass additional arguments to dpsql

This commit is contained in:
Pavle Portic 2023-09-08 17:36:36 +02:00
parent fe0a62e38e
commit 300e67f4ed
Signed by: TheEdgeOfRage
GPG Key ID: 66AD4BA646FBC0D2
1 changed files with 4 additions and 1 deletions

View File

@ -1,4 +1,7 @@
# 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.tailf3b9f.ts.net ${2}
env=${1}
db=${2}
shift 2
PGPASSWORD=$(aws secretsmanager get-secret-value --secret-id ${env}_${db}_db_${db}_user_password --output text --query SecretString) psql $@ -U ${db} -h ${env}-${db}-db.tailf3b9f.ts.net ${db}