pgadmin-org / pgadmin4

pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world.
https://www.pgadmin.org
Other
2.56k stars 659 forks source link

Provide connection details into passexec command as variables #8163

Closed pergardebrink closed 1 week ago

pergardebrink commented 1 week ago

Describe the solution you'd like

I would like to get connection details into the password exec command as variables so that I can connect to an AWS RDS database using IAM Authentication directly without having to copy the same information.

It would be very useful if I could use variables in the passexec, for example like the following:

aws rds generate-db-auth-token --profile myaccount-profile --hostname %DB_HOSTNAME% --port %DB_PORT% --username %DB_USERNAME%

Describe alternatives you've considered I currently have the following command as my passexec command, but I have to copy the hostname, port and username from the connection detail in pgAdmin into the command.

aws rds generate-db-auth-token --profile myaccount-profile --hostname my-rds-instance.us-east-1.rds.amazonaws.com --port 5432 --username developer

Additional context AWS RDS IAM database authentication for MariaDB, MySQL and PostgreSQL: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html

adityatoshniwal commented 1 week ago

Duplicates #6794.