Public subnet
A public subnet is a subnet with routing or configuration that permits its resources to connect directly to the public internet.
Terraform in Depth: Infrastructure as Code with Terraform and OpenTofu
A public subnet is a subnet configured with a route that permits direct internet connectivity for its resources.
- How it is used
- Places internet-facing services in a public subnet while keeping application and data services on private networks.
- How deep it goes
- Works through Terraform subnet allocation and public IP settings, while deferring internet-gateway setup to a higher-level module.
- Examples
- Uses a public load balancer in a three-tier application and a Terraform module that creates public and private subnets.
- What you can do after
- Build it from scratch with Terraform as part of a segmented network, while accounting for the separate internet-gateway setup.
Secure APIs
A public subnet is a cloud network subnet with a route or configuration that permits internet connectivity.
- How it is used
- Frames cloud network topology as part of API security threat modeling.
- How deep it goes
- Defines internet access and explains segmentation, but stops short of provider-specific configuration steps.
- Examples
- Illustrates public-subnet design through DMZ diagrams and cloud VPC segmentation.
- What you can do after
- Evaluate how subnet placement affects API exposure and channel inbound traffic through hardened boundary components.
Also covered in
What to know first
- access control listAn access control list is a set of rules or permissions specifying which identities or network traffic may access a resource or perform particular operations.
Related concepts
- subnetkind of · A subnet is a logical subdivision of an IP network with its own address range, defined by a network prefix.
- load balancingused by · Load balancing is the distribution or adjustment of work across multiple resources to manage demand and reduce overload or imbalance.
- networkpart of · A network is a set of interconnected entities and links that represent relationships or enable communication and resource exchange.
- NAT gatewayhas part · A NAT gateway is a network component that enables private-network resources to initiate outbound connections through address translation without accepting unsolicited inbound connections.
- private subnetcontrasts with · A private subnet is a subnet whose resources lack direct connectivity or reachability to the public internet.
Questions about public subnet
What is public subnet?
A public subnet is a subnet with routing or configuration that permits its resources to connect directly to the public internet.
Which Manning books explain public subnet?
Terraform in Depth: Infrastructure as Code with Terraform and OpenTofu and Secure APIs.
What should I know before learning public subnet?
Manning books that teach public subnet usually introduce access control list first.
What is the difference between public subnet and private subnet?
A public subnet is a subnet with routing or configuration that permits its resources to connect directly to the public internet. A private subnet is a subnet whose resources lack direct connectivity or reachability to the public internet.
What is public subnet a kind of?
Public subnet is a kind of subnet. A subnet is a logical subdivision of an IP network with its own address range, defined by a network prefix.
What is public subnet part of?
Public subnet is part of network. A network is a set of interconnected entities and links that represent relationships or enable communication and resource exchange.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

