nerdexam
Google

PROFESSIONAL-CLOUD-DEVELOPER · Question #373

Your team is responsible for developing multiple microservices. These microservices are deployed in Cloud Run and connected to a Cloud SQL instance. You typically conduct tests in a local…

The correct answer is D. Create a VM in the same VPC as the Cloud SQL instance. Connect to the VM by using Identity-. Google's recommended approach for accessing a private Cloud SQL instance (no external IP) from a local development environment is to use a VM in the same VPC as Cloud SQL, then tunnel through that VM using Identity-Aware Proxy (IAP) TCP forwarding. IAP provides authenticated…

Building and testing applications

Question

Your team is responsible for developing multiple microservices. These microservices are deployed in Cloud Run and connected to a Cloud SQL instance. You typically conduct tests in a local environment prior to deploying new features. However, the external IP was recently removed from your Cloud SQL instance, and you are unable to perform the tests. You need to connect to the database to conduct tests with the most updated data. You want to follow Google- recommended practices. What should you do?

Options

  • AExport the data from the database to a Cloud Storage bucket. Create a database on your
  • BCreate a Cloud VPN tunnel from your computer to your Google Cloud project, and connect to the
  • CAdd your IP as an authorized network on the Cloud SQL instance.
  • DCreate a VM in the same VPC as the Cloud SQL instance. Connect to the VM by using Identity-

How the community answered

(34 responses)
  • A
    6% (2)
  • B
    3% (1)
  • C
    12% (4)
  • D
    79% (27)

Explanation

Google's recommended approach for accessing a private Cloud SQL instance (no external IP) from a local development environment is to use a VM in the same VPC as Cloud SQL, then tunnel through that VM using Identity-Aware Proxy (IAP) TCP forwarding. IAP provides authenticated, encrypted access without exposing any public IPs. The Cloud SQL Auth Proxy running on or tunneled through the VM handles the final connection. Option A (exporting data) loses real-time data. Option B (Cloud VPN) requires complex network configuration and is not recommended for individual developer access. Option C (adding an authorized network) would require re-enabling an external IP on Cloud SQL, which was intentionally removed.

Topics

#Cloud SQL#Private Networking#Secure Access#Development Workflow

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVELOPER Practice