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

Resource Definition Basics

Define GCP resources in templates using type, name, and properties fields.

Resource Definition Basics

Important Notice: Google Cloud Deployment Manager reached end of support on March 31, 2026. For all new infrastructure deployments, you should use Google Cloud Infrastructure Manager or Terraform. The following content is provided strictly as a legacy reference for understanding and maintaining existing Deployment Manager configurations.

What you'll learn: How individual GCP resources are defined in legacy Deployment Manager templates using the three essential fields: type, name, and properties.


The Building Blocks of Legacy Resources

Every resource deployed in existing Google Cloud Deployment Manager configurations—whether a VM instance, storage bucket, or network—is defined using three core fields. These fields act as the blueprint for the cloud resource, indicating what was created, what it is called, and how it is configured.

The Three Essential Fields

type — Specifies the kind of GCP resource being managed. This follows the format <provider>/<api>/<resource>, such as compute.v1.instance for a virtual machine or storage.v1.bucket for a Cloud Storage bucket.

name — A unique identifier for the resource within the deployment. This name is used to reference the resource elsewhere in the configuration. Typical examples include descriptive labels like webserver-vm or app-data-bucket.

properties — A nested block containing all the specific configuration settings for the resource. This is where details like region, machine type, disk size, or network settings are defined—everything that customizes how the resource behaves.

Simple Reference Structure

When maintaining old templates, you will frequently encounter this structure:

resources:
- type: compute.v1.instance
  name: my-web-server
  properties:
    zone: us-central1-a
    machineType: zones/us-central1-a/machineTypes/n1-standard-1

In this reference snippet, the configuration dictates the management of a Compute Engine instance (type) named my-web-server (name), which runs in zone us-central1-a with an n1-standard-1 machine type (properties).

Key Takeaway: When maintaining legacy deployments, recognize that every GCP resource in Deployment Manager configurations required exactly three fields—type (what), name (identifier), and properties (how)—to fully describe the deployed infrastructure.