Course contentsShow
← Cloud and Infrastructure
Lesson 938 of 2,98918. Google Cloud Deployment ManagerFree lesson

Resource Definitions in Configurations

Learn how to define GCP resources directly in configuration files with type, name, and properties.

Resource Definitions in Configurations

Important: Google Cloud Deployment Manager reached end of support on March 31, 2026. This lesson is provided solely as a legacy reference for maintaining or migrating existing deployments. For all new infrastructure provisioning, direct your work to Google Cloud Infrastructure Manager or Terraform.

You'll learn: How individual Google Cloud resources were defined inside legacy Deployment Manager configuration files using type, name, and properties.

What Is a Resource Definition?

In Google Cloud Deployment Manager, a resource definition served as the blueprint for a single cloud resource (like a VM, disk, or network) managed by the deployment. Each definition lived inside a YAML configuration file and dictated exactly what was provisioned, what to call it, and how to configure it.

While you should not run Deployment Manager commands to spin up new infrastructure today, understanding this structure is highly valuable when reviewing, maintaining, or migrating legacy cloud environments.

The Three Required Elements

Every resource definition in a Deployment Manager YAML file required these three structural components:

1. name

A unique identifier for the resource within the specific deployment. Engineers used this to reference the resource elsewhere in the template or in interconnected templates.

2. type

Specified what kind of Google Cloud resource was being managed (e.g., a Compute Engine instance, a Cloud Storage bucket). These types corresponded directly to Google's underlying API resource types.

3. properties

The configuration details specific to that resource type—such as the machine type for a VM, the storage class for a bucket, or the IP range for a subnetwork.

Reference Example

If you are inspecting an existing legacy configuration file, a resource definition typically looks like this:

resources:
- name: my-vm
  type: compute.v1.instance
  properties:
    zone: us-central1-a
    machineType: zones/us-central1-a/machineTypes/f1-micro

In this reference snippet:

  • my-vm is the name.
  • compute.v1.instance is the type.
  • The properties block defines the zone and machine size.

When transitioning older infrastructure, you will use these three fields to map legacy resources into their modern equivalents in Terraform or Infrastructure Manager.

Key Takeaway: Legacy Deployment Manager configurations relied on name, type, and properties to declare managed Google Cloud resources; however, all new infrastructure work must use modern tools like Google Cloud Infrastructure Manager or Terraform.