Azure landing zone: no public surface, every packet inspected
A Terraform reference implementation of a CAF-aligned Azure landing zone: hub-spoke networking with forced tunnelling through Azure Firewall Premium, PaaS reachable only through private endpoints, and Azure Policy guardrails that deny drift.
- Role
- Architecture, Terraform and policy as code
- Period
- 2026
- Status
- Public reference implementation
- Problem
- Fast cloud migration leaves fragmented networks, public PaaS endpoints, over-privileged admins and firewall rules with no central egress logging.
- Key decision
- A hub that owns inspection and connectivity, user-defined routes that force all spoke traffic through it, private endpoints for every data service, and guardrails enforced as Azure Policy in Deny mode.
- Result
- A reviewable Terraform stack in which public Storage and Key Vault endpoints are refused by policy, and all egress passes TLS inspection and IDPS.
Architecture
Components and flows as text
| Component | Kind | Technology | Flows out |
|---|---|---|---|
| Users / on-prem | client | ExpressRoute · VPN | → GatewaySubnet: private connectivity |
| GatewaySubnet | edge | hybrid connectivity | → Azure Firewall Premium: inspected |
| Azure Firewall Premium | edge | TLS inspection · IDPS · threat intel | — |
| Workload spoke | service | UDR 0.0.0.0/0 → firewall | → Azure Firewall Premium: all egress (forced tunnelling); → Private endpoints: private IP only |
| Private endpoints | datastore | Storage · Key Vault · SQL | — |
| Azure Policy initiative | pipeline | Deny public / unencrypted / unapproved region | ⇢ Workload spoke: deny on drift |
| Management groups | service | platform · landing zones | ⇢ Azure Policy initiative: assignment scope |
Trust boundaries: Hub VNet (GatewaySubnet, Azure Firewall Premium); Spoke VNet (Workload spoke, Private endpoints).
Decisions
Forced tunnelling through the hub firewall
Each spoke has a route table sending 0.0.0.0/0 to the Azure Firewall private IP, so egress and spoke-to-spoke traffic are inspected and logged in one place.
Options considered
- Per-spoke NSGs and NAT gateways: cheaper, but egress is invisible and rules drift apart.
- Central firewall with forced routing: one place to inspect, log and allow-list.
Trade-off accepted
Firewall Premium is billed hourly and becomes a dependency for every spoke.
IDPS and threat intelligence in Deny, egress by FQDN allow-list
Azure Firewall Premium runs IDPS and threat-intel filtering in Deny mode with TLS inspection, and outbound traffic is limited to an explicit FQDN allow-list.
Options considered
- Alert mode: nothing breaks, and nothing is stopped.
- Deny mode: false positives surface and get tuned.
Trade-off accepted
New dependencies need an allow-list change before they work.
Guardrails as Azure Policy, not as a checklist
Custom policy definitions deny public Storage and Key Vault endpoints, unencrypted disks and unapproved regions, grouped in an initiative and assigned by Terraform.
Options considered
- Audit-only policies and periodic reviews.
- Deny effects that stop the deployment.
Trade-off accepted
Legitimate exceptions need an explicit exemption, which is itself reviewable.
Failure modes
| Failure | Detection | Handling | Evidence |
|---|---|---|---|
| A new spoke is deployed without the forced route | Egress for that range is missing from firewall logs | Route tables are created by the same code as the spoke | terraform/network.tf |
| A team creates a storage account with public access | Azure Policy deny event | The deployment is refused before the resource exists | policies/ |
What I would change next
- Add Privileged Identity Management for platform role assignments.
- Add plan-time policy tests in CI before apply.
Evidence index
Links point to the public repository.