The composite design pattern treats an infrastructure module as one instance while assembling, grouping, and ranking modules into a hierarchy. It supports composable, reproducible, and evolvable infrastructure configurations. section 3.2
Apply the pattern by:
- Combining dependent resources, such as a network and its subnet, inside one module. section 3.2
- Nesting modules to organize larger infrastructure systems and reproduce groups of related resources. section 3.2
- Combining composite modules with factory, prototype, singleton, and builder patterns according to purpose, reuse, update frequency, and resource composition. section 3.6
Network and subnet module
Define the network configuration, define the dependent subnet configuration, and place both in one module. Reusing that module reproduces the network system across environments. section 3.2
Figure 3.4 A network module can use the composite pattern to group the network and subnetwork resources.
Use the network diagram to see how the composite pattern groups network and subnetwork resources. section 3.2



