Cloud Deployment Manager will reach end of support on December 31, 2025. If you currently use Deployment Manager, please migrate to Infrastructure Manager or an alternative deployment technology by December 31, 2025 to ensure your services continue without interruption.
Stay organized with collections
Save and categorize content based on your preferences.
This tutorial goes through Deployment Manager using the gcloud
command-line tool. Follow the setup steps to prepare your local environment to
use Deployment Manager.
Create a project
Deployment Manager requires a Google Cloud project. If you already have a
project, you can use your existing project.
If you are new to Google Cloud, you can create a new project and take
advantage of Google Cloud's free trial
package, which gives you $300 to spend on all Google Cloud products
over 90 days. To sign up for the free trial:
Follow the instructions to sign up for the free trial.
When prompted to create a project, enter a name and a project ID that
will be used to identify your project, or accept the defaults, and
click Create.
...see naming guidelines
Enable the APIs for the Google Cloud resources that you want to manage
Deployment Manager uses the APIs of other Google Cloud services to
create and manage your resources. To create these resources, you must first
enable the services' APIs for your project.
For this walkthrough, you deploy Compute Engine resources, so
you need to enable the Compute Engine API.
Alternatively, use
Cloud Shell,
which comes with gcloud already installed.
Set your project ID.
Every command requires a project ID. Set a default project ID so you do not
need to provide it every time. Remember to replace myproject with your
own project ID.
gcloud config set project myproject
Set your default zone and region. Some Google Cloud resources require
a zone or a region, and you can set a default zone or region, similar to a
default project. To set a default zone or region, use gcloud config set.
In this case, use us-central1 as the region and us-central1-f as the
zone:
The Deployment Manager GitHub repository contains samples created by
Google and the Deployment Manager community, including the samples used in
this walkthrough.
gitclonehttps://github.com/GoogleCloudPlatform/deploymentmanager-samples
# open the samples foldercddeploymentmanager-samples/examples/v2/step_by_step_guide
Now that you have set up your environment, you can start creating your
deployment.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThis tutorial guides users through setting up and using Deployment Manager with the \u003ccode\u003egcloud\u003c/code\u003e command-line tool.\u003c/p\u003e\n"],["\u003cp\u003eA Google Cloud project is required, and new users can sign up for a free trial offering $300 in credits.\u003c/p\u003e\n"],["\u003cp\u003eUsers must enable the necessary APIs, such as the Compute Engine API and Deployment Manager API, for their project.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egcloud\u003c/code\u003e CLI, which can be installed locally or accessed via Cloud Shell, needs to be set up with a default project ID, region, and zone.\u003c/p\u003e\n"],["\u003cp\u003eUsers should clone the Deployment Manager GitHub repository to access sample configurations and the walkthrough materials.\u003c/p\u003e\n"]]],[],null,["# Installation and Setup\n\nThis tutorial goes through Deployment Manager using the `gcloud`\ncommand-line tool. Follow the setup steps to prepare your local environment to\nuse Deployment Manager.\n\nCreate a project\n----------------\n\nDeployment Manager requires a Google Cloud project. If you already have a\nproject, you can use your existing project.\n\nIf you are new to Google Cloud, you can create a new project and take\nadvantage of [Google Cloud's free trial](/free-trial)\npackage, which gives you $300 to spend on all Google Cloud products\nover 90 days. To sign up for the free trial:\n\n1. Open the [Google Cloud console](https://console.cloud.google.com/freetrial).\n2. Follow the instructions to sign up for the free trial.\n3. When prompted to create a project, enter a name and a project ID that will be used to identify your project, or accept the defaults, and click **Create** .\n | **Important:** The name you use must be between 4 and 30 characters. When you type the name, the form will suggest a project ID, which you can edit. The project ID you use must be between 6 and 30 characters, with a lowercase letter as the first character. You can use a dash, lowercase letter, or digit for the remaining characters, but the last character cannot be a dash. You should be aware that some resource identifiers (such as project IDs) might be retained beyond the life of your project. For this reason, avoid storing sensitive information in resource identifiers.\n ...see naming guidelines\n\nEnable the APIs for the Google Cloud resources that you want to manage\n----------------------------------------------------------------------\n\nDeployment Manager uses the APIs of other Google Cloud services to\ncreate and manage your resources. To create these resources, you must first\nenable the services' APIs for your project.\n\nFor this walkthrough, you deploy Compute Engine resources, so\nyou need to enable the Compute Engine API.\n\n\n[Enable the Compute Engine API](https://console.cloud.google.com/start/api?id=compute.googleapis.com)\n\nNext, enable Deployment Manager:\n\n\n[Enable the Deployment Manager API](https://console.cloud.google.com/start/api?id=deploymentmanager)\n\n\u003cbr /\u003e\n\nInstall Google Cloud CLI\n------------------------\n\nThe Google Cloud CLI offers a command-line tool, `gcloud`, that makes interacting\nwith Deployment Manager easy.\n\nTo install gcloud CLI:\n\n1. [Download and authenticate `gcloud`](https://cloud.google.com/sdk/#Quick_Start).\n\n Alternatively, use\n [Cloud Shell](https://console.cloud.google.com?cloudshell=true),\n which comes with `gcloud` already installed.\n2. Set your project ID.\n\n Every command requires a project ID. Set a default project ID so you do not\n need to provide it every time. **Remember to replace `myproject` with your\n own project ID**. \n\n gcloud config set project \u003cvar translate=\"no\"\u003emyproject\u003c/var\u003e\n\n3. Set your default zone and region. Some Google Cloud resources require\n a zone or a region, and you can set a default zone or region, similar to a\n default project. To set a default zone or region, use `gcloud config set`.\n In this case, use `us-central1` as the region and `us-central1-f` as the\n zone:\n\n gcloud config set compute/region us-central1\n gcloud config set compute/zone us-central1-f\n\nClone the Deployment Manager GitHub repository\n----------------------------------------------\n\nThe Deployment Manager GitHub repository contains samples created by\nGoogle and the Deployment Manager community, including the samples used in\nthis walkthrough. \n\n git clone https://github.com/GoogleCloudPlatform/deploymentmanager-samples\n\n # open the samples folder\n cd deploymentmanager-samples/examples/v2/step_by_step_guide\n\nNow that you have set up your environment, you can start creating your\ndeployment."]]