Question

Difficulty: EasyDeploying and Configuring Managed Database Instances

A cloud engineer is deploying a new Cloud SQL instance that must be accessible exclusively through private IP addresses within an existing Virtual Private Cloud (VPC) network. Which TWO actions must be completed to successfully configure private IP connectivity for this database instance? (Select TWO answers.)

  1. Establish a Private Services Access connection by allocating an internal IP range and peering the VPC network with Google Services.Answer
  2. Specify the target VPC network using the --network flag when creating the instance with gcloud CLI.Answer
  3. C
    Add a public Authorized Network entry set to 0.0.0.0/0 to allow internal VPC subnet routing.
  4. D
    Attach an External HTTP(S) Load Balancer directly to the database network interface to route internal private traffic.

Answer

To configure private IP connectivity for Cloud SQL, you must establish a Private Services Access connection (VPC network peering) in your VPC and supply the --network flag referencing your VPC network during instance creation.
Deploying a Cloud SQL instance with private IP requires Private Services Access (which establishes VPC network peering between your VPC and Google's service producer network) and supplying the target VPC network via the --network flag during deployment so an internal IP can be assigned.

Step-by-Step Solution

1
Allocate an IP range and configure Private Services Access
Establishes underlying VPC Peering between the customer VPC network and Google's private service producer network.
Cloud SQL instances with private IP reside in a Google-managed VPC that requires peering to communicate with client VPC resources.
2
Deploy the instance with the --network flag
The Cloud SQL instance receives an internal IP address within the peered VPC network.
The --network flag binds the Cloud SQL deployment to the established Private Services Access connection.

Key Concept

Cloud SQL Private IP and Private Services Access Configuration
Rate this question