jakob / Postico

Public issue tracking for Postico
https://eggerapps.at/postico/
475 stars 9 forks source link

Pre-connect shell script not working with AWS RDS through Proxy RDS #875

Open tomyf opened 7 months ago

tomyf commented 7 months ago

What did you do?

What did you expect to happen?

What actually happened?

What software versions are you using?

Postico server JSON configuration:

{
  "connection" : {
    "postgres" : {
      "database" : "bopgdb",
      "host" : "my-rds-proxy.proxy-id.eu-west-1.rds.amazonaws.com",
      "port" : 5432,
      "preconnectScript" : {
        "enabled" : true,
        "source" : "export PGPASSWORD=\"$(aws rds generate-db-auth-token --hostname my-rds-proxy.proxy-id.eu-west-1.rds.amazonaws.com --port 5432 --region eu-west-1 --username myuser --profile myprofile)\"\n\necho $PGPASSWORD"
      },
      "user" : "myuser"
    },
    "ssh" : {
      "enabled" : true,
      "host" : "1.2.3.4",
      "port" : 22,
      "privateKey" : {
        "data" : "xxx",
        "type" : "bookmark"
      },
      "user" : "my-ec2-bastion-user"
    }
  },
  "displayName" : "RDS through Proxy RDS",
  "startupQuery" : {
    "enabled" : false
  },
  "type" : "server",
  "uuid" : "1326EB50-2A12-4D6F-801A-6DB21ED7A4A6",
  "version" : 2
}