gcloud_alpha_deployment-manager_deployments_create (1)
NAME
- gcloud alpha deployment-manager deployments create - create a deployment
SYNOPSIS
-
gcloud alpha deployment-manager deployments create DEPLOYMENT_NAME (--composite-type=COMPOSITE_TYPE | --config=CONFIG | --template=TEMPLATE) [--create-policy=CREATE_POLICY; default="create-or-acquire"] [--credential=CREDENTIAL] [--description=DESCRIPTION] [--labels=[KEY=VALUE,...]] [--preview] [--properties=[PROPERTIES,...]] [--async | --automatic-rollback-on-error] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) This command inserts (creates) a new deployment based on a
POSITIONAL ARGUMENTS
-
- DEPLOYMENT_NAME
-
Deployment name.
REQUIRED FLAGS
-
-
Exactly one of these must be specified:
-
- --composite-type=COMPOSITE_TYPE
-
Name of a composite type to deploy.
- --config=CONFIG
-
Filename of a top-level yaml config that specifies resources to deploy.
- --template=TEMPLATE
-
Filename of a top-level jinja or python config template.
-
-
Exactly one of these must be specified:
OPTIONAL FLAGS
-
- --create-policy=CREATE_POLICY; default="create-or-acquire"
-
Create policy for resources that have changed in the update. CREATE_POLICY
must be one of: acquire, create, create-or-acquire.
- --credential=CREDENTIAL
-
Set the default credential that Deployment Manager uses to call underlying APIs
of a deployment. Use PROJECT_DEFAULT to set deployment credential same as the
credential of its owning project. Use serviceAccount:email to set default
credential using provided service account.
- --description=DESCRIPTION
-
Optional description of the deployment to insert.
- --labels=[KEY=VALUE,...]
-
List of label KEY=VALUE pairs to add.
Keys must start with a lowercase character and contain only hyphens (-), underscores (_), lowercase characters, and numbers. Values must contain only hyphens (-), underscores (_), lowercase characters, and numbers.
- --preview
-
Preview the requested create without actually instantiating the underlying
resources. (default=False)
- --properties=[PROPERTIES,...]
-
A comma separated, key:value, map to be used when deploying a template file or
composite type directly.
-
At most one of these may be specified:
-
- --async
-
Return immediately and print information about the Operation in progress rather
than waiting for the Operation to complete. (default=False)
- --automatic-rollback-on-error
-
If the create request results in a deployment with resource errors, delete that
deployment immediately after creation. (default=False)
-
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
EXAMPLES
To create a new deployment from a top-level yaml file, run:
-
$ gcloud alpha deployment-manager deployments create my-deployment \
--config config.yaml --description "My deployment"
To create a new deployment from a top-level template file, run:
-
$ gcloud deployment-manager deployments create my-deployment \
--template template.{jinja|py} \
--properties "string-key:'string-value',integer-key:12345"
To create a new deployment directly from a composite type, run:
-
$ gcloud deployment-manager deployments create my-deployment \
--composite-type <project-id>/composite:<type-name> \
\
--properties "string-key:'string-value',integer-key:12345"
To preview a deployment without actually creating resources, run:
-
$ gcloud alpha deployment-manager deployments create \
my-new-deployment --config config.yaml --preview
To instantiate a deployment that has been previewed, issue an update command for that deployment without specifying a config file.
More information is available at cloud.google.com/deployment-manager/docs/configuration
NOTES
This command is currently in ALPHA and may change without notice. If this command fails with API permission errors despite specifying the right project, you will have to apply for early access and have your projects registered on the API whitelist to use it. To do so, contact Support at cloud.google.com/support These variants are also available:
- $ gcloud deployment-manager deployments create $ gcloud beta deployment-manager deployments create