A cloud engineer needs to deploy a custom Virtual Private Cloud (VPC) environment in Google Cloud to host a secure internal application service. Arrange the following deployment steps in the correct logical sequence required to provision the infrastructure, set up IP addressing, enforce access security, and instantiate the workload.
- 1Create a custom-mode VPC network named `prod-vpc` with automatic subnet creation disabled using `gcloud compute networks create prod-vpc --subnet-mode=custom`.
- 2Provision a subnet named `backend-subnet` in region `us-east4` assigned to `prod-vpc` with primary IP range `10.240.10.0/24` using `gcloud compute networks subnets create`.
- 3Configure an ingress firewall rule `allow-backend-internal` in `prod-vpc` permitting TCP traffic on port 8443 targeting network tag `backend-app` using `gcloud compute firewall-rules create`.
- 4Launch a Compute Engine instance named `backend-vm-1` in zone `us-east4-a`, specifying `--subnet=backend-subnet` and `--tags=backend-app` using `gcloud compute instances create`.
Answer
The correct order of steps is: 1) Create the custom-mode VPC network, 2) Provision the custom subnet within the network and region, 3) Configure the ingress firewall rule targeting the specific network tag, and 4) Launch the Compute Engine instance attached to the subnet with the designated network tag.
The deployment sequence follows infrastructure dependency requirements in GCP: top-level VPC networks must be created first, followed by regional subnets within that VPC. Firewall rules belong to the VPC network and reference target network tags. Compute instances are created last because they reference both the subnet (for IP configuration) and network tags (for firewall rule binding).
Step-by-Step Solution
Key Concept
Dependency ordering for GCP VPC custom networking, regional subnet allocation, tag-based firewall policies, and VM provisioning.
Estimated Time:2m 0s