nerdexam
Google

PROFESSIONAL-DATA-ENGINEER · Question #298

You are developing an Apache Beam pipeline to extract data from a Cloud SQL instance by using JdbcIO. You have two projects running in Google Cloud. The pipeline will be deployed and executed on…

The correct answer is A. Set up VPC Network Peering between Project A and Project B. Add a firewall rule to allow the peered subnet range to access all instances on the network. Option A is correct because VPC Network Peering establishes a private network path between Project A and Project B, allowing Dataflow workers to reach the Cloud SQL private IP address without traffic traversing the public internet. The firewall rule is required to permit…

Submitted by stefanr· Mar 30, 2026Designing data processing systems

Question

You are developing an Apache Beam pipeline to extract data from a Cloud SQL instance by using JdbcIO. You have two projects running in Google Cloud. The pipeline will be deployed and executed on Dataflow in Project A. The Cloud SQL. instance is running in Project B and does not have a public IP address. After deploying the pipeline, you noticed that the pipeline failed to extract data from the Cloud SQL instance due to connection failure. You verified that VPC Service Controls and shared VPC are not in use in these projects. You want to resolve this error while ensuring that the data does not go through the public internet. What should you do?

Options

  • ASet up VPC Network Peering between Project A and Project B. Add a firewall rule to allow the peered subnet range to access all instances on the network.
  • BTurn off the external IP addresses on the Dataflow worker. Enable Cloud NAT in Project A.
  • CAdd the external IP addresses of the Dataflow worker as authorized networks in the Cloud SQL instance.
  • DSet up VPC Network Peering between Project A and Project B. Create a Compute Engine instance without external IP address in Project B on the peered

How the community answered

(28 responses)
  • A
    79% (22)
  • B
    4% (1)
  • C
    4% (1)
  • D
    14% (4)

Explanation

Option A is correct because VPC Network Peering establishes a private network path between Project A and Project B, allowing Dataflow workers to reach the Cloud SQL private IP address without traffic traversing the public internet. The firewall rule is required to permit ingress from the peered subnet CIDR to the Cloud SQL instance's port (typically 3306).

Why the distractors are wrong:

  • B - Removing external IPs and enabling Cloud NAT keeps traffic within Project A but does nothing to create a private path into Project B's network where Cloud SQL lives; NAT is for outbound internet traffic, not cross-project private routing.
  • C - Adding Dataflow worker IPs as authorized networks in Cloud SQL would technically work, but it routes traffic over the public internet (since authorized networks use public IPs), which violates the "no public internet" requirement.
  • D - This is an incomplete option (likely cut off), but a proxy Compute Engine instance in Project B is the Cloud SQL Auth Proxy pattern - it's a valid approach in some scenarios, but unnecessary complexity when peering alone suffices, and the option as written is truncated/invalid.

Memory tip: Think of VPC Peering as "building a private bridge between two houses (projects)" - once the bridge exists, you still need to unlock the door (firewall rule). Any answer that routes through public IPs (NAT, authorized networks) automatically fails a "no public internet" constraint.

Topics

#VPC Network Peering#Cloud SQL Connectivity#Dataflow Networking#Private Networking

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-DATA-ENGINEER Practice