A singleton pattern declares a set of infrastructure resources as singular instances in a system and deploys them with one command. A static file or directory holds environment-specific parameters and expresses relationships among resources in one place. section 3.1
Use the pattern deliberately when:
- A resource is unique, changes rarely, and has no need for multiple independently managed instances. section 3.6 section 3.7
- A small configuration benefits from a single reference for provisioning order, required parameters, debugging, and troubleshooting. section 3.1
- Expect the configuration to become a coordination and scaling liability when many resources share state, changes overlap, or one update affects a broad blast radius. section 9.0 section 10.0
Database infrastructure in GCP
One configuration defines a GCP project, a database network using 10.0.3.0/16, a server template that installs MySQL packages, and a server group containing three database servers. The configuration captures their relationships and provisions them together. section 3.1
Figure 3.1 A singleton pattern expresses the configuration of an initial set of resources—such as a project, network, and database—in one file. This pattern captures the relationships among resources in one place.
Shows how a singleton configuration places a project, network, and database resources in one file and captures their relationships. section 3.1





