Drag steps to the numbered slots on the right, or tap a step then tap a slot.
Cloud Digital Leader Trust and security with Google Cloud Practice Question
Drag and drop the steps to set up a Cloud NAT for private Compute Engine instances to access the internet in the correct order.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
Create a VPC network with a subnet, then create a Cloud Router in that network, then create a Cloud NAT gateway on that router and subnet, then configure firewall rules to allow egress traffic, then verify connectivity from private instances.
The setup requires a VPC, Cloud Router, NAT gateway, appropriate firewall rules, and verification.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Create a VPC network with a subnet, then create a Cloud Router in that network, then create a Cloud NAT gateway on that router and subnet, then configure firewall rules to allow egress traffic, then verify connectivity from private instances.
Why this is correct
This sequence correctly respects the resource dependency hierarchy: Cloud NAT is an outbound gateway that attaches to a specific regional subnetwork, so a VPC network with a subnet must exist first to provide the attachment point. A Cloud Router must then be created in that VPC because the NAT gateway references the router as its control plane for advertising the specific IP addresses used for translation. After the NAT gateway is created on that router and subnet, you configure VPC firewall rules that explicitly allow egress traffic from private instances; without such rules, even with NAT, outbound packets are dropped. Finally, verifying connectivity from a private instance (e.g., curl to an external IP) confirms that both routing and firewall settings are correctly aligned.
- ✗
Create a Cloud NAT gateway first, then create a Cloud Router, then create a VPC network, then configure firewall rules, then verify connectivity.
Why it's wrong here
Creating a Cloud NAT gateway first is impossible in the Google Cloud API because the gateway creation call requires the names of an existing VPC network, a Cloud Router, and a subnetwork—if any of those resources do not exist, the call fails with a resource-not-found error. Additionally, a Cloud Router itself depends on the VPC network existing, since it establishes BGP sessions and manages dynamic routes within that network, so creating the router before the VPC is also a dependency violation. Firewall rules are scoped to a VPC and cannot be created without the network either, meaning nearly every step in this order returns an error before any actual progress is made.
- ✗
Create firewall rules first, then create a VPC network, then create a Cloud Router, then create a Cloud NAT gateway, then verify connectivity.
Why it's wrong here
The primary flaw here is that firewall rules are VPC-scoped resources: they must be associated with a network, and attempting to create a firewall rule before the VPC exists results in an 'invalid resource' error because the target network is not found. While the subsequent sequence (VPC → Cloud Router → Cloud NAT) is structurally correct, the premature firewall creation makes the entire workflow invalid. Additionally, firewall rules are not a prerequisite for NAT creation; they only need to exist before actual traffic flows, so placing them first indicates a misunderstanding of the dependency order.
- ✗
Create a VPC network, then configure firewall rules, then create a Cloud NAT gateway, then create a Cloud Router, then verify connectivity.
Why it's wrong here
This order fails because Cloud NAT cannot be created without an existing Cloud Router: the NAT gateway configuration stores its state inside a router, which the NAT references by name and region, so attempting to create NAT before the router yields a validation error. Even though the VPC is correctly created first, the inversion of the router and NAT steps breaks the dependency chain, as the router must be present to host the NAT gateway. The firewall rules earlier in the sequence are not inherently harmful—they can be set before or after NAT—but the router-before-NAT requirement is strict, making this sequence invalid.
Visual reference
Go deeper
Related to this question
Learn chapter
Cloud Digital Transformation
Key term
NAT
NAT (Network Address Translation) is a method that allows multiple devices on a private network to share a single public IP address when accessing the internet.
Key term
Compute Engine
Compute Engine is Google Cloud's Infrastructure-as-a-Service (IaaS) offering that lets you create and run virtual machines on Google's infrastructure.
About these practice questions
This GCDL question is part of Courseiva's 829-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This GCDL practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the GCDL exam.