A cloud engineer is deploying a new Cloud SQL for SQL Server instance for an enterprise application using the gcloud CLI. The application architecture specifies high availability with automatic failover across two zones in the us-central1 region, private network access within an existing Virtual Private Cloud named prod-vpc, and complete prevention of public IP allocation. Which gcloud command correctly provisions the database instance according to these requirements?
- gcloud sql instances create prod-db --database-version=SQL_SERVER_2019_STANDARD --cpu=4 --memory=16GiB --region=us-central1 --availability-type=REGIONAL --network=projects/my-project/global/networks/prod-vpc --no-assign-ipCevap
- Bgcloud sql instances create prod-db --database-version=SQL_SERVER_2019_STANDARD --cpu=4 --memory=16GiB --region=us-central1 --availability-type=REGIONAL --authorized-networks=0.0.0.0/0
- Cgcloud sql instances create prod-db --database-version=SQL_SERVER_2019_STANDARD --cpu=4 --memory=16GiB --region=us-central1 --availability-type=ZONAL --network=projects/my-project/global/networks/prod-vpc --assign-ip
- Dgcloud sql instances create prod-db --database-version=SQL_SERVER_2019_STANDARD --cpu=4 --memory=16GiB --region=us-central1 --availability-type=REGIONAL --tier=db-custom-4-16000-spot
Cevap
The command using --availability-type=REGIONAL together with --network specifying the target VPC path and the --no-assign-ip flag correctly meets all high-availability and private IP requirements.
The correct command provisions a regional Cloud SQL instance (--availability-type=REGIONAL) to ensure zone-redundant high availability, attaches it to the specified VPC network via the --network flag, and explicitly suppresses public IP allocation by setting --no-assign-ip.
Adım Adım Çözüm
Anahtar Kavram
Deploying Cloud SQL Instances with Regional High Availability and Private Service Access