Google Cloud Professional Cloud Architect — Question 195

A Cloud Run service running your serverless application is unable to connect to an AlloyDB database created with default configurations. You need to troubleshoot and resolve the issue as quickly as possible. What should you do?

Answer options

Correct answer: B

Explanation

The correct answer is B because enabling Direct VPC egress allows the Cloud Run service to connect directly to the AlloyDB instance over the VPC, which is crucial for connectivity. Option A is incorrect as being in the same region alone does not guarantee connectivity without proper network configurations. Option C is also incorrect because while using a private IP can be beneficial, it does not resolve the underlying connectivity issue if VPC egress is not enabled. Option D is unnecessary as migrating to Cloud SQL is not required for solving the connectivity problem.