Vpc Mgmt
The Management VPC: Smaller, Tighter, Tagged
The mgmt VPC is where your bastions, VPN servers, and CI runners live — the doorway into everything else. It follows the same vpc-app module but with a different posture: small CIDR, explicit app-subnet ranges, and heavy tagging.
The configuration
module "mgmt_vpc" {
source = "../../modules/vpc-app"
vpc_name = "mgmt"
cidr_block = "10.10.0.0/16"
num_nat_gateways = 2
public_subnet_cidr_blocks = {
AZ-1 = "10.10.241.0/24"
AZ-2 = "10.10.242.0/24"
AZ-3 = "10.10.243.0/24"
AZ-4 = "10.10.244.0/24"
AZ-5 = "10.10.245.0/24"
}
private_app_subnet_cidr_blocks = {}
private_persistence_subnet_cidr_blocks = {}
custom_tags = { Foo = "Bar" }
public_subnet_custom_tags = { Foo = "Bar-public" }
private_app_subnet_custom_tags = {}
private_persistence_subnet_custom_tags = {}
}
What differs from an app VPC
- Explicit public ranges only — the mgmt VPC’s public subnets host the entrypoints (OpenVPN, bastion, ALBs), so their CIDRs are pinned for firewall rules and client configs; app/persistence tiers defer to computed defaults
custom_tagson everything — mgmt infrastructure is shared; consistent tagging is how cost attribution and “who owns this” stay answerable years later- No persistence tier content — mgmt VPCs rarely need stateful data subnets; the empty map lets the module skip that tier’s complexity
Takeaway
Same module, different posture: the mgmt VPC trades address abundance for pinned, tagged, auditable entrypoints — because everything else in the org is reached through it.
Verified: reconstructed example passes terraform validate against the real vpc-app module.