Question

Difficulty: HardDeploying and Configuring Managed Database Instances

A cloud engineer is deploying a high-availability production Cloud SQL for MySQL instance named `prod-mysql-db` inside a custom Virtual Private Cloud (VPC) network named `corp-vpc`. Security governance dictates that the database instance must strictly use Private IP connectivity without any public IP interface allocated, and must support automatic multi-zone failover. Which TWO configuration steps must be performed to satisfy these requirements?

  1. Allocate an internal IP address range and establish a Private Services Access connection (VPC network peering) between `corp-vpc` and the Service Networking network prior to creating the instance.Answer
  2. Execute `gcloud sql instances create prod-mysql-db` with the flags `--availability-type=REGIONAL`, `--no-assign-ip`, and `--network=corp-vpc`.Answer
  3. C
    Add the subnet CIDR block of `corp-vpc` under the Authorized Networks section of the Cloud SQL instance configuration.
  4. D
    Execute `gcloud sql instances create prod-mysql-db` with `--availability-type=ZONAL` and `--enable-bin-log` to enable automatic multi-zone failover.

Answer

To successfully deploy a high-availability Cloud SQL instance restricted to Private IP, an engineer must first set up a Private Services Access connection (VPC peering) between the host network and the Service Networking tenant project. Subsequently, the gcloud deployment command must specify `--availability-type=REGIONAL` for HA failover support, along with `--no-assign-ip` and `--network=corp-vpc` to enforce private network routing without exposing a public IP.
Deploying a Cloud SQL instance with Private IP connectivity requires a pre-existing Private Services Access connection (VPC Peering) on the custom VPC. For high availability, Cloud SQL instances must be provisioned with `--availability-type=REGIONAL`, which places primary and standby instances in distinct zones. Disabling public IP exposure requires explicit usage of the `--no-assign-ip` flag during CLI creation.

Step-by-Step Solution

1
Set up private connectivity infrastructure
Allocate an IP range and configure Private Services Access on `corp-vpc` so Cloud SQL can assign an internal IP address via VPC Peering.
Cloud SQL managed instances reside in a Google-managed VPC tenant project and require Private Services Access peering to communicate privately with a customer VPC.
2
Provision the Cloud SQL instance with regional HA and private networking flags
Run the `gcloud sql instances create` command including `--availability-type=REGIONAL`, `--no-assign-ip`, and `--network=corp-vpc`.
REGIONAL availability configures a primary and standby replica across different zones for automated failover, while `--no-assign-ip` disables public IPv4 attachment.

Key Concept

Cloud SQL Private IP Deployment and High Availability Configuration
Rate this question