Question

Difficulty: HardDeploying and Configuring Managed Database Instances

An enterprise security policy requires that a new high-throughput Cloud SQL for SQL Server database instance named `sql-fin-db` be deployed in the `us-east1` region. The database must be completely isolated from the public internet by disabling public IP address assignment and enabling Private IP connectivity over an existing VPC network named `corp-vpc`. Which `gcloud` command correctly provisions this managed database instance in full compliance with these security rules?

  1. gcloud sql instances create sql-fin-db --database-version=SQLSERVER_2019_STANDARD --tier=db-custom-4-16384 --region=us-east1 --network=corp-vpc --no-assign-ipAnswer
  2. B
    gcloud sql instances create sql-fin-db --database-version=SQLSERVER_2019_STANDARD --tier=db-custom-4-16384 --region=us-east1 --authorized-networks=0.0.0.0/0
  3. C
    gcloud sql instances create sql-fin-db --database-version=SQLSERVER_2019_STANDARD --tier=db-custom-4-16384 --region=us-east1 --network=corp-vpc --assign-ip
  4. D
    gcloud compute instances create sql-fin-db --image-family=sql-server-2019-standard --zone=us-east1-b --network=corp-vpc

Answer

The command starting with `gcloud sql instances create sql-fin-db` that includes both `--network=corp-vpc` and `--no-assign-ip` correctly provisions the managed database instance with Private IP connectivity while preventing public IP allocation.
The correct command uses `gcloud sql instances create` to deploy a managed Cloud SQL instance, sets `--network=corp-vpc` to enable internal network connectivity via Private Services Access, and explicitly specifies `--no-assign-ip` to disable public IP address allocation, fulfilling all security mandates.

Step-by-Step Solution

1
Identify the managed database deployment service and CLI tool group
Use `gcloud sql instances create` specifically for Cloud SQL instance creation rather than `gcloud compute instances create`.
Cloud SQL is a fully managed relational database service in GCP requiring `gcloud sql` commands.
2
Configure internal private networking
Pass the `--network=corp-vpc` parameter.
This establishes private IP connectivity over the Private Services Access connection peered with the `corp-vpc` network.
3
Enforce public internet isolation
Include the `--no-assign-ip` flag.
By default Cloud SQL instances receive an external public IP; specifying `--no-assign-ip` ensures no public IP address is assigned to the database.

Key Concept

Deploying Cloud SQL Instances with Private IP and Disabling Public IP
Rate this question