You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cloud-sql/postgres/servlet/README.md
+60-3Lines changed: 60 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -27,10 +27,50 @@ export DB_PASS='my-db-pass'
27
27
export DB_NAME='my_db'
28
28
```
29
29
Note: Saving credentials in environment variables is convenient, but not secure - consider a more
30
-
secure solution such as [Cloud KMS](https://cloud.google.com/kms/) to help keep secrets safe.
30
+
secure solution such as [Secret Manager](https://cloud.google.com/secret-manager/) to help keep secrets safe.
31
+
32
+
## Configure SSL Certificates
33
+
For deployments that connect directly to a Cloud SQL instance with TCP,
34
+
without using the Cloud SQL Proxy,
35
+
configuring SSL certificates will ensure the connection is encrypted.
36
+
1. Use the gcloud CLI to [download the server certificate](https://cloud.google.com/sql/docs/mysql/configure-ssl-instance#server-certs) for your Cloud SQL instance.
37
+
- Get information about the service certificate:
38
+
```
39
+
gcloud beta sql ssl server-ca-certs list --instance=INSTANCE_NAME
- Download the certificate information to a local PEM file
46
+
```
47
+
gcloud beta sql ssl server-ca-certs list \
48
+
--format="value(cert)" \
49
+
--instance=INSTANCE_NAME > \
50
+
server-ca.pem
51
+
```
52
+
53
+
2. Use the gcloud CLI to [create and download a client public key certificate and client private key](https://cloud.google.com/sql/docs/postgres/configure-ssl-instance#client-certs)
54
+
- Create a client certificate using the ssl client-certs create command:
For more details about using Cloud Run see http://cloud.run.
122
168
Review other [Java on Cloud Run samples](../../../run/).
169
+
170
+
### Deploy to Google Cloud Functions
171
+
172
+
To deploy the application to Cloud Functions, first fill in the values for required environment variables in `.env.yaml`. Then run the following command
0 commit comments