Google Cloud Professional Cloud Database Engineer — Question 128
You are migrating an on-premises application to Compute Engine and Cloud SQL. The application VMs will live in their own project, separate from the Cloud SQL instances which have their own project. What should you do to configure the networks?
Answer options
- A. Create a new VPC network in each project, and use VPC Network Peering to connect the two together.
- B. Create a Shared VPC that both the application VMs and Cloud SQL instances will use.
- C. Use the default networks, and leverage Cloud VPN to connect the two together.
- D. Place both the application VMs and the Cloud SQL instances in the default network of each project.
Correct answer: B
Explanation
The correct answer is B because using a Shared VPC allows both the application VMs and Cloud SQL instances to communicate efficiently within a centralized network while maintaining project separation. Option A, while feasible, adds unnecessary complexity with VPC Network Peering. Option C would require additional configurations for VPN, which is not as efficient as using a Shared VPC. Option D does not align with the requirement of separating the projects.