c69256d7ca7add42170c88d8b08c3e05fa5d37fe

Author
Pavle Portic <git@theedgeofrage.com>
Committer
Pavle Portic <git@theedgeofrage.com>
Date

Message

Add dpsql function

Diff

 1diff --git a/dot_config/zsh/functions/dpsql b/dot_config/zsh/functions/dpsql
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..96d90e83701f1805c8dbc37e878b504140f4617c
 4--- /dev/null
 5+++ b/dot_config/zsh/functions/dpsql
 6@@ -0,0 +1,4 @@
 7+# vim: ft=zsh
 8+# connect to dune RDS instance
 9+
10+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}