Secure Cloud SQL Migration Connectivity and Access

PCDBE By islever Editorial Last updated

Determine database connectivity and access management considerations. Design and implement data migration and replication.

Short answer

BD Establish Private Service Connect for secure hybrid connectivity and configure IAM roles to restrict access for the Cloud SQL instance.

Question

You are planning to migrate a 10 TB relational database from an on-premises environment to Cloud SQL for PostgreSQL. The database contains sensitive customer information. You want to follow Google-recommended practices to keep data secure during the migration. What should you do? (Choose two.)
  1. Configure Cloud SQL for automatic patching, and enable binary logging.
  2. Establish a Private Service Connect connection between your on-premises environment and the Cloud SQL instance. Correct Answer
  3. Use an external IP address for the Cloud SQL instance, and configure firewall rules.
  4. Set up Identity and Access Management (IAM) roles to restrict access with Cloud SQL with an internal IP address. Correct Answer
  5. Leverage Storage Transfer Service with client-side encryption.

Key Takeaways

The question tests the ability to select private connectivity options over public ones for sensitive data migrations.

Learn how to securely migrate sensitive on-premises databases to Cloud SQL by using Private Service Connect and IAM restrictions.

Common mistake: Choosing external IPs with firewall rules (Option C) is a common mistake because it exposes the database to the public internet, violating the principle of keeping sensitive data within private networks.

Expert Analysis

The scenario requires migrating sensitive data from on-premises to Cloud SQL for PostgreSQL while adhering to Google-recommended security practices. The core challenge is establishing a secure, private connectivity path and enforcing strict access controls.

First, consider the connectivity mechanism. Option B suggests using Private Service Connect (PSC). PSC provides a private, internal IP address for Cloud SQL instances, allowing traffic to flow securely between your on-premises network and Google Cloud without traversing the public internet. This is the recommended approach for hybrid connectivity to ensure data remains within Google's private backbone, minimizing exposure to external threats. In contrast, Option C proposes using an external IP with firewall rules. While firewalls are useful, relying on public IPs increases the attack surface and is generally discouraged for sensitive workloads compared to private connectivity solutions like PSC or Cloud Interconnect.

Second, evaluate access management. Option D recommends setting up IAM roles to restrict access when using an internal IP. Combining internal IPs (via PSC) with robust IAM policies ensures that only authorized service accounts or users can connect to the database. This defense-in-depth strategy aligns with the principle of least privilege. Option A focuses on patching and binary logging, which are maintenance features rather than primary migration security controls. Option E involves Storage Transfer Service with client-side encryption; however, this service is designed for object storage (Cloud Storage), not direct relational database migration to Cloud SQL.

Therefore, the combination of private connectivity via PSC (B) and restricted IAM access (D) constitutes the most secure, Google-recommended practice for this migration scenario.

Official Reference

https://cloud.google.com/sql/docs/postgres/configure-private-service-connect

This link opens the official vendor documentation in a new tab.

Exam Strategy

When securing cloud services, always prioritize private connectivity mechanisms like Private Service Connect or VPC peering over public endpoints. Combine these with strict IAM policies to enforce least privilege access, ensuring both network-level and identity-level security.

Frequently Asked Questions

Why is Private Service Connect preferred over external IPs?

PSC keeps traffic within Google's private network backbone, avoiding the public internet and reducing the attack surface for sensitive data.

Can I use Cloud Interconnect instead of PSC?

Yes, Cloud Interconnect is also valid for hybrid connectivity, but PSC is often simpler to configure for specific service connections like Cloud SQL.

More PCDBE FAQ →

Community Votes

B
50%
D
50%

50% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.

Discussion 2 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 2

  1. c3815ba 👍 3
    ✅ B. Use Private Service Connect (PSC) • PSC enables private, secure connectivity to Cloud SQL using internal IPs only, even across hybrid networks (on-prem to GCP). • Prevents exposing the Cloud SQL instance over the public internet. • This is a Google-recommended practice for connecting securely from on-premises environments to GCP-managed services. ⸻ ✅ D. Use IAM roles + internal IPs • IAM enforces least privilege access control for managing and connecting to Cloud SQL instances. • Internal IP usage ensures connections remain inside the VPC, not over the public internet. • Together, these controls reduce the attack surface and follow GCP security best practices.
  2. AwesomeGCP 👍 1
    The correct answers are B. Establish a Private Service Connect connection between your on-premises environment and the Cloud SQL instance and D. Set up Identity and Access Management (IAM) roles to restrict access with Cloud SQL with an internal IP address.

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

← Back to PCDBE Study Guide