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

YAML Configuration File Structure

Understand the basic structure of a Deployment Manager configuration file using YAML syntax.

What You'll Learn

You'll learn how to read and understand the structure of a legacy Google Cloud Deployment Manager configuration file using YAML syntax.

Important Notice: Google Cloud Deployment Manager reached end of support on March 31, 2026. The following material is provided strictly as a legacy reference for understanding and maintaining existing deployments. Please direct all new infrastructure work to Google Cloud Infrastructure Manager or Terraform.

The Building Blocks of Deployment Manager YAML

Historically, a Deployment Manager configuration file served as a blueprint written in YAML to tell Google Cloud what resources to manage and how to configure them. Understanding this syntax is essential if you are migrating or maintaining older infrastructure.

Basic YAML Structure

Every legacy Deployment Manager configuration file follows a fundamental hierarchical structure. Here is a reference example of how a storage bucket was defined:

resources:
  - name: my-storage-bucket
    type: storage.v1.bucket
    properties:
      location: US
      storageClass: STANDARD

The Essential Elements

When reviewing existing configuration files, you will encounter these core components:

1. Resources Section
The resources: key is the mandatory root element. It contains the list of all infrastructure components defined in the template.

2. Resource Name
Each item in the resources list starts with a dash (-). The name key provides a unique identifier for the resource within the configuration.

3. Resource Type
The type specifies the Google Cloud service and version being managed (e.g., storage.v1.bucket). This told Deployment Manager which underlying API to call.

4. Properties
The properties block contains the configuration settings specific to the resource type, such as the location or storageClass of a storage bucket.

Understanding YAML Syntax

YAML (YAML Ain't Markup Language) relies entirely on indentation and colons to create its hierarchy, making it highly readable. Proper indentation is critical—two spaces are standard. When maintaining these legacy files, note that inconsistent spacing or the use of tabs instead of spaces will cause parsing errors.

Key Takeaway: A legacy Deployment Manager YAML configuration file consists of a top-level resources section containing a list of infrastructure components, each defined by a unique name, a service type, and specific properties for configuration.