GCP ACE · Question 39 · Domain 4.5: Managing networking resources
Your company has a custom VPC with a subnet named 'app-subnet' using the IP range 10.0.0.0/24. You have run out of IP addresses in this subnet and need to expand it to a /20 range without recreating the subnet or disrupting existing VMs.
Which command should you use?
Answer options:
gcloud compute networks subnets update app-subnet --range=10.0.0.0/20
gcloud compute networks subnets expand-ip-range app-subnet --prefix-length=20
gcloud vpc subnets resize app-subnet --cidr=10.0.0.0/20
You cannot expand a subnet; you must create a new one and migrate the VMs.
50 questions · hints · full answers · grading