Google Cloud Professional Cloud Developer — Question 356
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?
Answer options
- A. Configure your Cloud Run service with a Cloud SQL connection.
- B. Configure your Cloud Run service to use a Serverless VPC Access connector.
- C. Configure your application to use the Cloud SQL Java connector.
- D. Configure your application to connect to an instance of the Cloud SQL Auth proxy.
Correct answer: B
Explanation
The correct answer is B because using a Serverless VPC Access connector allows your Cloud Run service to connect to the Cloud SQL instance using its internal IP address, adhering to the regulatory requirements. Option A does not specify the use of internal IP, option C is focused on a specific library but does not address the connectivity requirement, and option D relies on the Cloud SQL Auth proxy, which does not meet the internal IP criteria.