Introduction to Composite Types
Important Legacy Notice: Google Cloud Deployment Manager reached end of support on March 31, 2026. All new infrastructure work should be directed to Google Cloud Infrastructure Manager or Terraform. The following content is provided strictly as legacy reference for maintaining and understanding existing deployments.
You'll learn how composite types were used to package multiple related Google Cloud resources into a single, reusable building block in Deployment Manager.
What Are Composite Types?
Think of composite types like LEGO kits. Instead of buying individual bricks every time you wanted to build a house, you could buy a "house kit" that included walls, doors, windows, and a roof—all the pieces that make sense together. In Deployment Manager, a composite type bundled multiple related Google Cloud resources (like a VM instance, persistent disk, and network interface) into one reusable package.
Without composite types, teams had to define the same group of resources repeatedly across different deployments. With composite types, that bundle was defined once and reused everywhere across legacy infrastructure configurations.
How They Work
A composite type is essentially a template (like a Python or Jinja2 template) that has been registered as a named, reusable type within an existing Deployment Manager project. Once registered, it could be referenced in configurations just like a native Google Cloud resource type (such as compute.v1.instance).
For example, if an architecture frequently required a web server with a VM, persistent disk, and firewall rule, developers created a composite type called something like my-web-server. Then, instead of writing dozens of lines defining those three individual resources, they simply referenced my-web-server as a single unit.
Legacy Benefits
While maintaining existing Deployment Manager environments, recognizing composite types helps you understand how the original authors achieved:
- Reusability: Writing a template once and using it many times.
- Consistency: Maintaining exact resource patterns across environments.
- Simplified configurations: Reading high-level building blocks instead of low-level configuration details.
When migrating to modern tools, equivalent concepts (like Terraform modules) provide similar benefits for new deployments.
Key Takeaway: In legacy Google Cloud Deployment Manager setups, composite types acted as reusable bundles that grouped related resources together, simplifying configurations and promoting consistency. For modern workloads, you should use Terraform modules or Google Cloud Infrastructure Manager to achieve this same abstraction.