A prototype module accepts inputs and returns static defaults for other modules to consume. It usually exports configuration values rather than creating infrastructure directly. section 3.4
Apply the pattern when shared configuration must remain consistent and easy to evolve:
- Collect common metadata or settings in one module instead of hardcoding them across resources. section 3.4
- Pass the module’s returned copy into consuming resources, which can append or apply the predefined values. section 3.4
- Use a prototype module for reusable repository checks when multiple module repositories must follow common formatting and linting standards. section 5.1.3
- Update the prototype once, while recognizing that distributed repositories can still complicate dependency discovery and troubleshooting. section 5.1.3
Standard resource tags
A tagging prototype returns customer, business unit, cost center, and automated values. A database server consumes the returned tags, keeping metadata consistent without creating tag resources. section 3.4
Figure 3.7 A module with the prototype pattern returns a copy of static values, such as tags, for consumption by other infrastructure resources.
Shows the prototype module returning static values for consumption by infrastructure resources. section 3.4
