QuestionQ306

Integrating applications with Google Cloud services

Your team develops multiple microservices that run on Cloud Run and connect to a Cloud SQL instance. You normally test in a local environment before deploying new features. However, the external IP address was recently removed from the Cloud SQL instance, so you can no longer perform the tests.

You need to connect to the database to test with the most current data and want to follow Google-recommended practices. What should you do?

  • A Export the data from the database to a Cloud Storage bucket. Create a database on your computer and import the data.
  • B Create a Cloud VPN tunnel from your computer to your Google Cloud project, and connect to the Cloud SQL instance.
  • C Add your IP as an authorized network on the Cloud SQL instance.
  • D Create a VM in the same VPC as the Cloud SQL instance. Connect to the VM by using Identity-Aware Proxy for TCP forwarding. Install and configure the Cloud SQL Auth Proxy.
Explanation

For a Cloud SQL instance using private IP, the Cloud SQL Auth Proxy must run on a resource that has access to the same VPC network as the instance. A VM in that VPC provides that connectivity, while Identity-Aware Proxy TCP forwarding permits secure access to the VM without exposing an external IP. The proxy uses IAM-based authorization and secure encrypted connections without requiring authorized networks.

Learn more

Community Discussion

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