Cloud Run Java app must connect to a Cloud SQL instance using the instance's internal IP. Following Google best practices, how should you configure connectivity?
Choose an answer
Tap an option to check your answer.
Correct answer: Configure the Cloud Run service to use a Serverless VPC Access connector..
Why this is the answer
To connect Cloud Run to a Cloud SQL instance using its internal IP, a Serverless VPC Access connector is required. This connector allows serverless environments like Cloud Run to send traffic into a specified VPC network, enabling access to private IP resources such as Cloud SQL internal IPs. Configuring the Cloud Run service with a Cloud SQL connection is for public IP connections, not internal IPs. Using the Cloud SQL Java connector in the application is a library for connecting, but doesn't solve the network connectivity issue for private IPs. Connecting via a Cloud SQL Auth proxy instance is primarily for secure public IP connections or when the proxy is deployed within the same VPC, but Serverless VPC Access is the direct best practice for Cloud Run to private Cloud SQL.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed