A network provides connectivity between application systems and users. In infrastructure practice, it is a deployable resource that servers, queues, load balancers, and other components depend on. section 1.1 section 9.2.5
Treat networks as explicit, changeable infrastructure:
- Parameterize the network instead of hardcoding an environment-specific name, making configurations reusable across development and production. section 2.3.5
- Model dependencies clearly: queues and servers depend on the network, while load balancers and DNS depend on deployed services. section 9.2.5
- Review deletion carefully when a network is shared, confirm inactivity, remove references, and then remove its infrastructure-as-code definitions. section 9.2.5
Reusable server network
A Python function accepts a server name and network name, generates Terraform JSON, initializes Terraform, applies the configuration, verifies the instance’s network, and can destroy it afterward. section 2.3.5


