You have deployed a Java application to Cloud Run. Your application requires access to a database hosted on Cloud SQL. Due to regulatory requirements, your connection to the Cloud SQL instance must use its internal IP address. How should you configure the connectivity while following Google-recommended best practices?
- AConfigure your Cloud Run service with a Cloud SQL connection.
- BConfigure your Cloud Run service to use a Serverless VPC Access connector. (correct answer)
- CConfigure your application to use the Cloud SQL Java connector.
- DConfigure your application to connect to an instance of the Cloud SQL Auth proxy.
Reveal answer & explanationHide answer
The correct answer is B. Option B: Configure your Cloud Run service to use a Serverless VPC Access connector.
Explanation
Cloud Run runs stateless containers serverlessly and scales to zero, minimizing operational overhead. A VPC provides a global, software-defined private network for your Google Cloud resources.
