Google Cloud Professional Cloud Database Engineer — Question 111

You are writing an application that will run on Cloud Run and require a database running in the Cloud SQL managed service. You want to secure this instance so that it only receives connections from applications running in your VPC environment in Google Cloud. What should you do?

Answer options

Correct answer: D

Explanation

The correct answer is D because it ensures that the Cloud SQL instance is created with an internal IP address, which restricts access to only the VPC and requires the use of a Serverless VPC Access connector for Cloud Run to connect securely. Options A and B use an external IP address, which exposes the instance to the public internet and does not meet the security requirement. Option C doesn’t use a connection pool, which is beneficial for managing multiple connections efficiently.