An operations team needs to deploy a production backend Virtual Machine named `app-backend-prod` in zone `us-central1-a` using the `e2-standard-4` machine type. According to organization security compliance rules, the instance must connect to a custom subnetwork named `prod-app-subnet` within `prod-vpc`, must be assigned a fixed internal IP address of `10.150.0.45`, must not have a public external IP address attached, and must include the network tag `allow-internal-api` for firewall matching. Which `gcloud` command correctly provisions this Compute Engine VM instance?
- gcloud compute instances create app-backend-prod --zone=us-central1-a --machine-type=e2-standard-4 --network=prod-vpc --subnet=prod-app-subnet --private-network-ip=10.150.0.45 --no-address --tags=allow-internal-apiCevap
- Bgcloud compute instances create app-backend-prod --zone=us-central1-a --machine-type=e2-standard-4 --network=prod-vpc --subnet=prod-app-subnet --internal-ip=10.150.0.45 --external-ip=none --target-tags=allow-internal-api
- Cgcloud compute instances create app-backend-prod --zone=us-central1-a --machine-type=e2-standard-4 --network=prod-vpc --subnet=prod-app-subnet --private-network-ip=10.150.0.45 --no-address --tags=allow-internal-api --provisioning-model=SPOT
- Dgcloud compute instances create app-backend-prod --zone=us-central1-a --machine-type=e2-standard-4 --network=prod-vpc --subnet=prod-app-subnet --scopes=https://www.googleapis.com/auth/cloud-platform --no-address --tags=allow-internal-api
Cevap
The command starting with 'gcloud compute instances create app-backend-prod --zone=us-central1-a --machine-type=e2-standard-4 --network=prod-vpc --subnet=prod-app-subnet --private-network-ip=10.150.0.45 --no-address --tags=allow-internal-api' is correct.
The correct response accurately combines `--private-network-ip=10.150.0.45` to set the fixed internal IP, `--no-address` to disable external IP assignment, and `--tags=allow-internal-api` to apply network tags on the specified subnet within `prod-vpc`.
Adım Adım Çözüm
Anahtar Kavram
Deploying Compute Engine instances with custom networking flags in gcloud CLI