cf-service-connect
cf-service-connect copied to clipboard
include the connection URI in the no-client output
Builds on #44 - diff. Closes #35.
$ cf connect-to-service -no-client myapp mydb
Finding the service instance details...
Setting up SSH tunnel...
SSH tunnel created.
Skipping call to client CLI. Connection information:
Host: localhost
Port: 52929
Username: myuser
Password: mypass
Name: mydb
To connect:
PGPASSWORD=mypass psql -h localhost -p 52929 mydb myuser
Connection URI:
postgresql://myuser:mypass@localhost:52929/mydb
Leave this terminal open while you want to use the SSH tunnel. Press Control-C to stop.
/cc @harrisj