title: Connecting to Google Cloud SQL PostgreSQL using Cloud Shell with SSL?
body: <p>I've set up a PostgreSQL instance on Google Cloud SQL and have set it up now to only allow SSL connections. I'm able to connect from my workstation via psql and from some apps like R Studio.</p>
  
  <p>However I'm trying to connect via the GCloud Shell and don't seem to see any options to connect with SSL. There are <a href="https://cloud.google.com/sql/docs/postgres/configure-ssl-instance" rel="nofollow noreferrer">options to manage certifications</a> and I've created another client key and downloaded the files for it in my cloud shell account, I just don't see options for using them to make a connection. Without it just tells me there isn't an HBA for a "No SSL" connection.</p>
  
  <p>Here is what I see (some things obfuscated):</p>
  
  <pre><code>don@cloudshell:~ (xxx)$ gcloud sql connect foo --user=postgres
  Whitelisting your IP for incoming connection for 5 minutes...done.
  Connecting to database with SQL user [postgres].Password for user postgres:
  psql: FATAL:  connection requires a valid client certificate
  FATAL:  pg_hba.conf rejects connection for host "a.b.c.d", user "postgres", database "postgres", SSL off
  </code></pre>