Question

Difficulty: MediumDeploying and Configuring Managed Database Instances

A systems administrator needs to deploy a high-availability Cloud SQL for MySQL database instance that is accessible exclusively using Private IP from an existing Virtual Private Cloud (VPC) network named `internal-vpc`. Which two configurations or procedures must be executed to satisfy these requirements? (Select TWO answers.)

  1. Create a private services access connection by allocating an IP address range and establishing VPC network peering with Google services inside `internal-vpc`.Answer
  2. Provision the Cloud SQL instance using `gcloud sql instances create` with the `--availability-type=REGIONAL`, `--network=internal-vpc`, and `--no-assign-ip` flags.Answer
  3. C
    Provision the Cloud SQL instance using `gcloud sql instances create` with `--availability-type=ZONAL` and specify `--authorized-networks=0.0.0.0/0` to enable internal subnet routing.
  4. D
    Assign primitive `roles/owner` permissions to the Cloud SQL default service account and deploy the instance with a public IP address for internal VPC routing.

Answer

To deploy a high-availability Cloud SQL instance accessible only via Private IP, you must establish a private services access connection (VPC network peering) in `internal-vpc` and create the Cloud SQL instance using the `--availability-type=REGIONAL`, `--network=internal-vpc`, and `--no-assign-ip` flags.
Deploying a high-availability Cloud SQL instance on Private IP requires two key steps: first, establishing a private services access connection (allocating an IP block and peering the VPC), and second, provisioning the database instance with regional availability (`--availability-type=REGIONAL`) linked to the VPC network (`--network`) without a public IP (`--no-assign-ip`).

Step-by-Step Solution

1
Configure Private Services Access in the VPC
An IP range is allocated and VPC Network Peering is configured between the custom VPC (`internal-vpc`) and Google's internal service producer network.
Cloud SQL managed instances run inside a Google-managed VPC, requiring Private Service Access peering to communicate directly over internal IP addresses.
2
Deploy the Regional Cloud SQL Instance with Private IP Flags
The database instance is provisioned with a regional HA architecture (primary and standby instances in different zones) and disabled public IP address.
Passing `--availability-type=REGIONAL` ensures multi-zone high availability, while `--no-assign-ip` and `--network` ensure traffic travels exclusively over the private network.

Key Concept

Cloud SQL High Availability and Private IP Provisioning
Rate this question