A cloud engineer needs to deploy a primary Cloud SQL for MySQL database instance with private IP connectivity in a custom VPC network, enable binary logging, and provision a cross-region read replica in a secondary region. Arrange the steps in the correct operational sequence to complete this deployment.
- 1Allocate an internal IP address range for Google Services in the custom VPC network using the gcloud compute addresses create command.
- 2Establish a private connection between the custom VPC network and Google Services using the gcloud services vpc-peerings connect command.
- 3Deploy the primary Cloud SQL instance using gcloud sql instances create with --network, --no-assign-ip, and --enable-bin-log flags.
- 4Provision the read replica in the secondary region using gcloud sql instances create with the --master-instance-name flag.
Answer
The correct sequence is: 1) Reserve an internal IP address range for private services in the custom VPC network, 2) Establish a VPC peering connection to Google Services, 3) Create the primary Cloud SQL instance with private IP and binary logging enabled, and 4) Provision the cross-region read replica referencing the primary instance.
The correct deployment sequence starts by allocating an internal IP range in the custom VPC network for Google Services, followed by establishing VPC peering via Service Networking. Next, the primary Cloud SQL instance is created with private IP (--no-assign-ip and --network) and binary logging enabled (--enable-bin-log). Finally, the cross-region read replica is created by specifying the primary instance as its master.
Step-by-Step Solution
Key Concept
Deploying Cloud SQL Instances with Private IP and Cross-Region Read Replicas