
Answer-first summary for fast verification
Answer: Configure VPC Network Peering between both networks. In Cloud Run, create a Cloud SQL connection that uses the internal IP. Use Cloud SQL Language Connectors to interact with the database.
To connect a Cloud Run application to a Cloud SQL database in a separate project on an isolated network without a public IP, the most effective method is to configure VPC Network Peering between the networks of both projects. This allows the Cloud Run application to access the Cloud SQL database using its internal IP address, ensuring secure and private communication. Option B correctly outlines this approach by suggesting the configuration of VPC Network Peering and the use of Cloud SQL Language Connectors for database interaction. While the Serverless VPC Access connector is not explicitly mentioned in Option B, it is an implied necessity for Cloud Run to access resources in the peered VPC, making Option B the most accurate choice among the provided options.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
How can you connect a Cloud Run application to a Cloud SQL database located in a separate project, where the database resides on an isolated network without a public IP?
A
Create a Private Service Connect endpoint on your network. Create a Serverless VPC Access connector on your project. Use Cloud SQL Language Connectors to create an internal connection.
B
Configure VPC Network Peering between both networks. In Cloud Run, create a Cloud SQL connection that uses the internal IP. Use Cloud SQL Language Connectors to interact with the database.
C
Configure private services access on your project. In Cloud Run, create a Cloud SQL connection. Use Cloud SQL Language Connectors to interact with the database.
D
Create a subnet on your VPC. Create a Serverless VPC Access connector on your project using the new subnet. In Cloud Run, create a Cloud SQL connection. Use Cloud SQL Language Connectors to interact with the database.
No comments yet.