Creating Custom Composite Types
Important Legacy Notice: Google Cloud Deployment Manager reached end of support on March 31, 2026. This material is provided strictly as a legacy reference for maintaining or migrating existing deployments. For all new infrastructure automation on Google Cloud, you should use Google Cloud Infrastructure Manager or Terraform.
What you'll learn: How reusable infrastructure patterns were bundled into shareable, versioned composite types in Google Cloud Deployment Manager.
What Are Custom Composite Types?
In legacy environments utilizing Deployment Manager, composite types served as templates that combined multiple resources into a single logical unit. Custom composite types allowed teams to package common infrastructure patterns—such as "a VM with a static IP and firewall rule" or "a database cluster with backups configured"—into a reusable component that could be deployed consistently across projects.
Think of it like a blueprint for a pre-fabricated room in a house. Instead of specifying every wall, outlet, and fixture each time, the pattern was defined once, then referenced wherever needed in the architecture.
Why Legacy Systems Used Custom Composite Types
Historically, custom composite types provided several advantages that engineers now find in modern concepts like Terraform modules:
- Standardization: Enforcing best practices and organizational policies across environments.
- Reusability: Writing the infrastructure pattern once and referencing it everywhere.
- Simplification: Hiding complexity from engineers consuming the deployment scripts.
- Version control: Updating patterns centrally without altering individual deployment files.
The Structure of Composite Types
A custom composite type was essentially a template (typically YAML, Python, or Jinja2) that was registered with Deployment Manager. Once registered, it acted as a first-class resource type that could be referenced in configurations just like native GCP resources.
The composite type defined:
- What resources it provisioned internally.
- What parameters it accepted from consumers.
- What outputs it exposed.
Teams could package logic once (e.g., a "web-tier-with-load-balancer"), then reference it by name in multiple legacy deployments, passing different parameters each time, such as instance size or region. When managing these old templates today, understanding this structural logic is critical so you can safely maintain them or migrate the encapsulated resources to modern tools like Infrastructure Manager or Terraform.
Key Takeaway: Custom composite types in Google Cloud Deployment Manager transformed frequently used infrastructure patterns into reusable components; understanding their structure is vital for maintaining legacy architectures and planning migrations to modern infrastructure-as-code solutions.