問題文
A module could either create the network it needs or accept an existing network's identifier as an input. Which structure does the composition guidance favor for a reusable module, and why?
選択肢
- Create the network inside the module but guard it with a variable that skips the creation, since that covers both cases in one module and the repeating meta-argument set to zero is the documented way to make a resource optional.
- Accept the identifier as an input and also create a network, using whichever one is available at plan time.
- Create the network inside the module, so that a single module call produces a complete working environment with no external prerequisites.
- Accept the identifier as an input, so the module can be used with a network the caller already owns and its own lifecycle stays smaller.