
Answer-first summary for fast verification
Answer: Define a connection string using Cloud SQL Auth proxy configured with a service account to point to the internal (private) IP address of your Cloud SQL instance.
To ensure that your application can access your Cloud SQL for PostgreSQL instance without requiring configuration changes to your database, the best approach is to use the Cloud SQL Auth proxy. The Cloud SQL Auth proxy provides secure access to your Cloud SQL instance without the need for authorized networks or for configuring SSL. It uses IAM permissions to control who and what can access your Cloud SQL instance, and it encrypts all traffic to and from the database. Since your VM is on your corporate network and the Cloud SQL instance has an internal (private) IP address, you should point the connection string to the internal IP address. Using a service account with the Cloud SQL Auth proxy ensures that the connection is authenticated and secure. Therefore, the correct answer is to define a connection string using Cloud SQL Auth proxy configured with a service account to point to the internal (private) IP address of your Cloud SQL instance.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
How can you enable your Java application on a corporate network VM to connect via JDBC to a Cloud SQL for PostgreSQL instance (IP 192.168.3.48, SSL disabled) without modifying the database configuration?
A
Define a connection string using your Google username and password to point to the external (public) IP address of your Cloud SQL instance.
B
Define a connection string using a database username and password to point to the internal (private) IP address of your Cloud SQL instance.
C
Define a connection string using Cloud SQL Auth proxy configured with a service account to point to the internal (private) IP address of your Cloud SQL instance.
D
Define a connection string using Cloud SQL Auth proxy configured with a service account to point to the external (public) IP address of your Cloud SQL instance.
No comments yet.