
Google Professional Cloud Developer
Get started today
Ultimate access to all questions.
You are developing an application using App Engine and Cloud SQL for PostgreSQL. Before deploying new versions to the shared development environment, you want to test your application code locally while ensuring all traffic to Cloud SQL instances remains encrypted and authenticated via Cloud IAM and PostgreSQL. What steps should you take before launching the local development server?
You are developing an application using App Engine and Cloud SQL for PostgreSQL. Before deploying new versions to the shared development environment, you want to test your application code locally while ensuring all traffic to Cloud SQL instances remains encrypted and authenticated via Cloud IAM and PostgreSQL. What steps should you take before launching the local development server?
Explanation:
The correct answer is B. The Cloud SQL Auth Proxy provides secure access to Cloud SQL instances by encrypting traffic and authenticating using IAM. Running the proxy locally allows the application to connect to localhost, which routes traffic securely to the Cloud SQL instance. Option A uses a local PostgreSQL database, which does not test against the actual Cloud SQL setup. Option C adds unnecessary complexity by involving a Compute Engine instance. Option D relies on private IP access, which is not typically available locally, and manual encryption does not ensure proper IAM authentication.