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?
- 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
- Execute `gcloud sql instances create prod-mysql-db` with the flags `--availability-type=REGIONAL`, `--no-assign-ip`, and `--network=corp-vpc`.Answer
- CAdd the subnet CIDR block of `corp-vpc` under the Authorized Networks section of the Cloud SQL instance configuration.
- DExecute `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
Key Concept
Cloud SQL Private IP Deployment and High Availability Configuration