An infrastructure system involves a set of resources that depend on each other. For example, a server depends on the existence of a network. How do you know the network exists before creating a server? You can express this with an infrastructure dependency. An infrastructure dependency happens when a resource requires another one to exist before creating or modifying the first one.
Definition
Usually, you identify the server’s dependency on the network by hardcoding the network identifier. However, hardcoding more tightly binds the dependency between server and network. Anytime you change the network, you must update the hardcoded dependency.
In chapter 2, you learned how to avoid hardcoding values with variables to promote reproducibility and evolvability. Passing the network identifier as a variable better decouples the server and network. However, a variable works between resources only in the same module. How can you express dependencies between modules?