QuestionQ66

VerifiedIntegrating applications with Google Cloud services

You have a Cloud Run service that must connect to a Cloud SQL instance located in a different project. You granted the Cloud Run service account the Cloud SQL Client IAM role on the project hosting Cloud SQL. However, the connection test fails. You want to resolve the connection failure while following Google-recommended practices. What should you do?

Explanation

For a cross-project Cloud Run-to-Cloud SQL connection, the Cloud Run service account needs the Cloud SQL Client role on the project that contains the Cloud SQL instance, and the Cloud SQL Admin API must be enabled in both projects. The Cloud SQL Client role already includes the connection permission, so separately adding that permission is unnecessary.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!