A Deployment Manager configuration file is the YAML file you give the service to describe the resources you want. It has a resources section, which is required, and optional imports and outputs sections. Each resource has a name, a type, and a set of properties, and Deployment Manager turns that description into real resources, such as a virtual machine, in your project.
Before you build anything, note that Deployment Manager reached end of support on March 31, 2026. Google says existing users can keep managing, migrating, or deleting existing resources at their own risk, but it does not answer standard support tickets for the service and does not support new customers or organizations using it. The replacement is Infrastructure Manager, which uses Terraform. Treat this guide as background for understanding how the service works and for maintaining an existing deployment.
This walks through listing the resource types you can use, writing a configuration file for a virtual machine, previewing it before anything is created, and then either deploying the preview or cancelling and deleting it.
This shows the resource types Deployment Manager supports, which is where the type in a configuration file comes from:
gcloud deployment-manager types list

Create a file with the extension .yaml. This will be your configuration file:
nano vm.yaml

Paste in the following. The header comments are Google’s licence notice for this sample, so keep them if you reuse the code. The only change from the original is the image family, now debian 12 instead of debian 9.
# Copyright 2016 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the “License”);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an “AS IS” BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
resources:
– name: vm-created-by-deployment-manager
type: compute.v1.instance
properties:
zone: us-central1-a
machineType: zones/us-central1-a/machineTypes/n1-standard-1
disks:
– deviceName: boot
type: PERSISTENT
boot: true
autoDelete: true
initializeParams:
sourceImage: projects/debian-cloud/global/images/family/debian-12
networkInterfaces:
– network: global/networks/default
To close the editor, press control x, then y to confirm, then enter. The file is saved. The screenshots may still show the original code, so check them and retake any that do before you publish.

A preview lets you see the resources Deployment Manager would create without creating any real ones. It builds placeholder resources instead, so you can check the plan before committing to it.
gcloud deployment-manager deployments create example-config –config vm.yaml –preview

Steps Five, Six, and Seven below are choices, not a sequence. Google’s documentation gives you these options after a preview.
Do not run all three in order on the same deployment. Once you delete it, there is nothing left to deploy. Google also advises cancelling and deleting any previewed deployments you no longer need, so they do not pile up.
gcloud deployment-manager deployments cancel-preview example-config

gcloud deployment-manager deployments delete example-config

gcloud deployment-manager deployments update example-config
This turns the previewed placeholder resources into real ones. Because the service is out of support, these commands may still work in a project that already uses Deployment Manager, but a new project may not be able to use it at all, and I have not tested them.

For new work, use Infrastructure Manager, which runs Terraform for you, or Terraform itself. Deployment Manager configuration files and templates map onto Terraform configuration and modules. Google provides a tool called DM Convert to convert existing ones, and the Adding Templates guide in this series covers the replacement and the migration route in more detail.
That covers how a Deployment Manager configuration file is structured and how to preview it safely. To go further, explore Prwatech’s Google Cloud training program, which includes placement assistance.