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

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.