GOOGLE CLOUD → STACKIT · NETWORK MAPPING
GCP VPC, Firewall Rules and Cloud NAT on STACKIT
A VPC network becomes STACKIT networks in a project, a firewall allow rule becomes a security group rule, and Cloud NAT becomes the outbound path of the STACKIT network. Deny rules, tag selectors and a fixed egress address do not carry over one to one, and StackToIT names each of them in the run.
One firewall rule, rewritten as a security group
A small network written for this page and assessed by StackToIT on 4 November 2026: two subnetworks, four firewall rules, a Cloud Router with Cloud NAT and a reserved address. Left: the HTTPS rule of the input. Right: the resource blocks of the STACKIT Terraform the run wrote; the review comments above each block in the file are left out here.
resource "google_compute_firewall" "web_https" {
name = "allow-https-web"
network = google_compute_network.core.name
direction = "INGRESS"
priority = 1000
allow {
protocol = "tcp"
ports = ["443"]
}
source_ranges = ["0.0.0.0/0"]
target_tags = ["web"]
}resource "stackit_security_group" "web_https" {
project_id = var.project_id
name = "allow-https-web"
}
resource "stackit_security_group_rule" "web_https_allow_https_web" {
project_id = var.project_id
security_group_id = stackit_security_group.web_https.security_group_id
direction = "ingress"
ether_type = "IPv4"
ip_range = "0.0.0.0/0"
port_range = {
max = 443
min = 443
}
protocol = {
name = "tcp"
}
}Direction, range and port carry over
The ingress rule for TCP 443 from 0.0.0.0/0 becomes one rule of a security group with the same range and port.
The target tag does not
The source applies the rule to instances tagged web. STACKIT has no tag selector, so the run leaves a decision: which network interfaces list this group.
Priority is dropped
STACKIT security group rules have no priority, and the run records that the order the source relied on is not carried.
Cloud NAT and the egress deny rule
The part of the network where the models differ most. Left: the end of the input file, from the rule that denies outgoing SMTP through the Cloud Router and the reserved address to the NAT gateway. Right: the one block the run wrote for them.
resource "google_compute_firewall" "deny_egress_smtp" {
name = "deny-egress-smtp"
network = google_compute_network.core.name
direction = "EGRESS"
priority = 900
deny {
protocol = "tcp"
ports = ["25"]
}
destination_ranges = ["0.0.0.0/0"]
}
resource "google_compute_router" "core" {
name = "core-router"
region = "europe-west3"
network = google_compute_network.core.id
}
resource "google_compute_address" "nat" {
name = "core-nat-ip"
region = "europe-west3"
}
resource "google_compute_router_nat" "core" {
name = "core-nat"
router = google_compute_router.core.name
region = "europe-west3"
nat_ip_allocate_option = "MANUAL_ONLY"
nat_ips = [google_compute_address.nat.self_link]
source_subnetwork_ip_ranges_to_nat = "ALL_SUBNETWORKS_ALL_IP_RANGES"
}resource "stackit_public_ip" "nat" {
project_id = var.project_id
}The reserved address becomes a public IP
The run classes it DIRECT, and notes that the address itself changes, so DNS entries and partner allowlists need updating.
The NAT gateway has no block
Outbound access for servers without a public IP is part of the STACKIT network. The run says that a fixed egress address which partners allowlist is not kept that way.
The deny rule is a redesign
A security group only allows. The run classes the rule REDESIGN and explains how to rebuild the intent as explicit egress rules.
How the network estate maps
Every row is a unit of the run on the example estate: ten resources scanned, nine migration units. The Cloud Router has no unit of its own; it is the place where the NAT configuration lives.
| Google Cloud resource | STACKIT target in the run | Migration class |
|---|---|---|
| VPC network | STACKIT project networking, with a Network Area where networks must reach each other privately | Reconfigure |
| Subnetwork | STACKIT network with the same IPv4 range | Reconfigure |
| Firewall rule, allow | STACKIT security group with one rule per allow rule | Reconfigure |
| Firewall rule whose source is a network tag | Security group; the rule is written as a comment until you map the tag to a group or to ranges | Reconfigure |
| Firewall rule, egress deny | No equivalent: STACKIT security groups only allow | Redesign |
| Cloud NAT gateway | Implicit outbound access of the STACKIT network | Reconfigure |
| Reserved external address | STACKIT public IP | Direct |
Classes as the run decided them. The example sets no lock file for the Google provider, so every unit stays at medium confidence at best; the egress deny rule is rated low.
Where the two models differ in practice
The Google Cloud column follows the VPC firewall and Cloud NAT documentation; the STACKIT column follows the security group, public IP and network documentation, and the run output where it says so.
| Topic | Google Cloud | STACKIT |
|---|---|---|
| Where a rule lives | A rule belongs to a VPC network and applies to all instances, to instances with given network tags or to instances running as given service accounts. | A security group belongs to a project and acts on the network interfaces that list it. The run notes that the VPC membership of the source rule is not carried. |
| Order and deny | Priorities from 0 to 65535, default 1000; a rule either allows or denies. | Rules only allow. They are evaluated together, with no order, and combine when several groups sit on one interface. |
| Defaults | Ingress denied and egress allowed unless a rule says otherwise. | Ingress denied except from members of the same group; egress allowed. The run adds that the provider does not manage the two default egress rules of a new group, so they are deleted after apply if egress must be narrower. |
| Stateful behaviour | Return traffic of an allowed connection is allowed. | Groups can be stateful as well: return traffic of an allowed connection is let through without a matching rule. |
| Google-only source ranges | The IAP range 35.235.240.0/20 lets Identity-Aware Proxy reach port 22 without a public address on the VM. | The run copies the range into the rule of allow-iap-ssh and flags it: Google health-check and IAP ranges do not exist on STACKIT, so replace them with the addresses of your bastion host or load balancer. |
| Outbound address | Cloud NAT can use a manual, fixed set of external addresses that a destination can allowlist. | Servers without a public IP leave through the router IP of the network. A public IP attached to a server becomes that server’s outbound address. The run states that the router address cannot be set. |
| Name resolution | The resolver of the VPC also answers private zones and internal host names. | The run warns that private names need a DNS server of their own. |
| Rule propagation | Not covered here. | A comment in the run output says a rule change reached the data plane 27 to 50 seconds after the API answered; check after a minute. |
The order that works
Practice, tied to the files the run writes.
List the rules by what they select
Read each firewall rule for its target (all instances, tags or service accounts), its direction and its priority. The run keeps one security group per rule and the findings say which ones select by tag.
Decide the network shape
Subnetworks become networks. If they must reach each other privately across projects, they join a Network Area; ranges are then taken from the area.
Attach groups to interfaces
The manual steps of the run, in execution/manual/actions.md, list which network interfaces name each group. Resolve every tag into a group or into ranges.
Rebuild the deny rules
For an egress deny, delete the default egress rules after apply and create an egress rule for every destination the source still allows.
Fix the outbound address
If a partner allowlists your NAT addresses, give the servers that call it a public IP and send the new address before cutover.
Verify after a minute
Test reachability with the rules in place and wait for propagation before you judge a rule.
Questions network teams ask
Can a Google Cloud firewall rule that denies traffic move to STACKIT?
Not as a deny. STACKIT security groups have no deny rules, so StackToIT classes an egress deny rule as REDESIGN. The intent is rebuilt by deleting the default egress rules of the group and allowing only the destinations the source still reaches.
Will our outbound IP address stay the same?
No. The reserved address becomes a STACKIT public IP, a different address. The run also states that the network’s shared outbound address is not fixed and cannot be set; a public IP per server keeps its address.
What happens to rules that select by network tag?
STACKIT has no tag selector. The run writes the group and leaves the rule as a commented block until an owner maps the tag to a security group or to ranges; it never expands a tag into addresses.
Does StackToIT change anything in our Google Cloud project?
No. It reads the Terraform and writes files; nothing is applied to any cloud. The security group rules are applied by your team after review.
Sources
Your next move: STACKIT.
Tell us about your estate. We show you what StackToIT delivers for it: target architecture, Terraform artifacts and a structured migration plan.