A lead cloud engineer needs to deploy a new production Cloud SQL for PostgreSQL database instance named `analytics-db` in the `us-east1` region using the `gcloud` CLI. Corporate security policies require that the database instance communicate exclusively over private IP addresses within a Virtual Private Cloud (VPC) named `production-vpc`, and that no public IPv4 address is assigned to the database instance. Which `gcloud` command correctly deploys the database instance to satisfy these security and network requirements?
- gcloud sql instances create analytics-db --database-version=POSTGRES_15 --tier=db-custom-4-16384 --region=us-east1 --network=projects/my-project/global/networks/production-vpc --no-assign-ipCevap
- Bgcloud sql instances create analytics-db --database-version=POSTGRES_15 --tier=db-custom-4-16384 --region=us-east1 --network=projects/my-project/global/networks/production-vpc --assign-ip
- Cgcloud sql instances create analytics-db --database-version=POSTGRES_15 --tier=db-custom-4-16384 --region=us-east1 --authorized-networks=0.0.0.0/0
- Dgcloud bigtable instances create analytics-db --cluster=analytics-c1 --cluster-zone=us-east1-a --cluster-num-nodes=3 --instance-type=PRODUCTION
Cevap
The command 'gcloud sql instances create analytics-db --database-version=POSTGRES_15 --tier=db-custom-4-16384 --region=us-east1 --network=projects/my-project/global/networks/production-vpc --no-assign-ip' correctly provisions the private Cloud SQL instance without a public IP.
The option specifying `--network=projects/my-project/global/networks/production-vpc` and `--no-assign-ip` is correct because `--network` connects the Cloud SQL instance to the VPC network via Private Service Access, and `--no-assign-ip` explicitly prevents Google Cloud from assigning a public IPv4 address to the instance.
Adım Adım Çözüm
Anahtar Kavram
Deploying Cloud SQL instances with Private IP connectivity and suppressing public IP allocation via the gcloud CLI