Deploying Networking & Infrastructure as Code

Google ACE ACE · Planning and implementing a cloud solution

By Abu Anns · Last updated 20 November 2026Exam version: ACE (exam guide live 30 June 2026)

VPC networks: the basics

A Virtual Private Cloud (VPC) network is the software-defined network for your Google Cloud resources. Unlike the other major clouds, a Google Cloud VPC is global: a single VPC spans all regions, and its subnets are regional. That means a VM in europe-west2 and a VM in us-central1 can be on the same VPC and communicate over Google's private network without any peering or VPN between regions. Each project starts with a default VPC (auto mode, with a subnet in every region and permissive firewall rules), but production environments should use a custom VPC designed for the workload.

VPCs come in two subnet modes. An auto mode VPC automatically creates one subnet per region with a predefined IP range — convenient for getting started, inflexible for production. A custom mode VPC has no subnets until you create them, and you choose each subnet's region and IP range yourself — this is the recommended mode for real workloads, because it lets you control address space and avoid overlapping ranges with on-premises networks. A subnet's IP range can be expanded later but never shrunk, and a subnet cannot be moved to another region. Every project can have multiple VPCs, and a VM's network interface attaches to one subnet in one VPC (VMs can have additional interfaces on other VPCs).

Shared VPC

Shared VPC lets multiple projects share a single VPC network owned by a host project. Service projects attach to the host project's VPC and deploy resources into its subnets, while the central networking team keeps control of the network configuration, firewall rules, and IP addressing. Shared VPC is the answer when a question describes centralized network administration across many projects: one team owns the network, many teams use it, and each team's resources stay in its own project for billing and IAM separation. The alternative — a separate VPC per project with peering between them — is harder to manage at scale and is not the recommended pattern for this requirement.

Firewall rules and policies

Google Cloud firewall rules control traffic to and from VM instances, and they are stateful: if an ingress connection is allowed, the return traffic is allowed automatically. Rules are defined at the VPC level and apply to instances through targets — all instances in the network, instances with a specific network tag, or instances running as a specific service account. Each rule has a direction (ingress for incoming traffic, egress for outgoing), a priority (lower number wins; the default is 1000), an action (allow or deny), and a source or destination (IP ranges, or the network itself). When a packet matches multiple rules, the lowest-priority-numbered rule wins; if no rule matches, the implied rules apply — implied allow for egress, implied deny for ingress.

Two practical points matter for the exam. First, targeting by service account is more robust than targeting by network tag: tags are just labels on a VM that anyone with the right role can change, while a service account is an identity tied to the workload. A rule that allows traffic to the service account of the database VMs is harder to bypass than one that allows traffic to VMs tagged "database". Second, firewall policies (hierarchical firewall policies) let administrators set rules at the organization or folder level that apply to all VPCs beneath them — the same inheritance idea as the resource hierarchy, applied to firewalls. The exam also tests the implied rules: a VM cannot be reached from the internet unless an ingress rule allows it, which is why a new VM is not reachable on port 80 until you create a firewall rule for it.

Connecting networks: VPN and peering

Two services connect a VPC to networks outside Google Cloud or to other VPCs. Cloud VPN creates an encrypted IPsec tunnel between a VPC and an on-premises network (or another cloud) over the public internet. It comes in two forms: Classic VPN (a single tunnel, with static or dynamic routing) and HA VPN (two tunnels with automatic failover, 99.99% availability SLA — the recommended choice for production). VPC Network Peering connects two VPC networks privately, so resources in one can communicate with resources in the other using internal IP addresses. Peering is non-transitive: if VPC A peers with B and B peers with C, A cannot reach C through B. Peering is also the way to connect VPCs in different projects or organizations when Shared VPC is not suitable. The exam's key distinction: VPN connects to on-premises over the internet with encryption; peering connects VPCs to each other privately; and Cloud Interconnect (Dedicated or Partner) is the direct, private physical connection for high-bandwidth, low-latency hybrid connectivity — more expensive, not an internet tunnel.

Infrastructure as code

Infrastructure as code (IaC) means defining cloud resources in configuration files rather than creating them by clicking in the console. The exam guide lists four tools: Terraform (the most widely used, with a Google Cloud provider), Cloud Foundation Toolkit (Google's set of reusable Terraform modules and blueprints), Config Connector (which lets you manage Google Cloud resources through Kubernetes manifests), and Helm (which packages Kubernetes applications). For the ACE exam, the essential idea is what IaC gives you: repeatable deployments, version-controlled infrastructure, reviewable changes, and the ability to recreate an environment from scratch. If a question describes a team that deploys the same environment repeatedly, or needs to review infrastructure changes before applying them, the answer involves IaC — usually Terraform. The exam does not test Terraform syntax in depth; it tests knowing when IaC is the right approach and which tool fits which job.

Cloud Router and dynamic routing

Cloud Router is Google Cloud's managed BGP router: it exchanges routes dynamically between a VPC and an on-premises network (over Cloud VPN or Cloud Interconnect), so that each side learns the other's routes automatically instead of relying on static routes that must be maintained by hand. When a new subnet is added to the VPC, Cloud Router advertises it to the on-premises network; when a new prefix appears on-premises, it is advertised into the VPC. Cloud Router is required for HA VPN and for dynamic routing on Interconnect, and it is the answer whenever a question describes routes that should update automatically as networks change. The alternative — static routes — works for small, stable topologies but becomes unmanageable as networks grow, and the exam treats dynamic routing via Cloud Router as the better answer for hybrid connectivity at any real scale.

A related service worth knowing is Private Service Connect, which lets a VPC access Google services (such as Cloud Storage or BigQuery) or a partner's service through a private IP address inside the VPC, without the traffic crossing the public internet. It is the modern replacement for Private Google Access in many designs, and the answer when a question requires private connectivity to Google APIs from VMs without external IPs. Combined with Cloud NAT for outbound internet and Cloud DNS private zones for internal naming, it completes the picture of a VPC that is fully private yet fully functional — the architecture the exam rewards for security-sensitive workloads.

Advertisement

Exam traps to watch for

Practice questions

Test yourself on this guide. Answers are checked instantly, with a full explanation for each question.

Q1.A company wants one central networking team to manage the VPC, firewall rules, and IP ranges, while application teams deploy resources into that network from their own projects. Which design fits?

Report an error

Q2.A new VM is running, but users cannot reach its web server on port 80 from the internet. The VM has an external IP address. What is the most likely cause?

Report an error

Q3.A firewall rule should allow traffic only to the VMs that run the database, and the rule must keep working even if someone changes a VM's labels. What is the most robust way to target the rule?

Report an error

Q4.A company needs to connect its on-premises data center to Google Cloud with an encrypted connection over the internet, with automatic failover if one tunnel goes down. Which service should they use?

Report an error

Q5.Three VPC networks are peered in a chain: VPC A peers with VPC B, and VPC B peers with VPC C. Can a VM in VPC A communicate with a VM in VPC C through VPC B?

Report an error

Q6.A team deploys the same three-tier environment (VPC, VMs, database) for each new customer, and the process is slow and error-prone when done by hand in the console. What should they adopt?

Report an error

Q7.Which statement about Google Cloud VPC networks is correct?

Report an error

Q8.A team creates a custom mode VPC for a production application. What must they do before they can launch a VM in it?

Report an error