- NAME
- gcloud-preview-deployment-manager-templates-create - Insert (Create) a template resource.
- SYNOPSIS
-
gcloud preview deployment-manager templates create TEMPLATE [--api-version API_VERSION; default="v1beta2"] [--format FORMAT] [--help] [--project PROJECT] [--quiet, -q] --template-file TEMPLATE_FILE [-h]
- DESCRIPTION
- This command inserts (creates) a template resource.
- You must provide a relative path to a local template file, either in YAML or JSON format, to create a template resource.
- If you want to use actions in your template, you can use a combination of script files and commands to specify your actions. In some cases, you might want to group a number of related commands into a script file for organization and readability reasons.
- To include a local script file, use the %file prefix in front of your script file’s path. For example, if you specify the following in your template:
-
actions: install-apache: commands: [ "apt-get update", "apt-get -y install apache2", "%file:/path/to/my/website-setup-script.sh" ]
-
the third command would copy the contents of the local file
/path/to/my/website-setup-script.sh
to a file on your Compute Engine virtual machines, and execute that file. For more information, please see https://developers.google.com/deployment-manager/yaml#includes - Please note that each command or %file entry in your template must be less than 32KB in size, and the aggregate size of all of your commands must be less than 512KB.
- POSITIONAL ARGUMENTS
-
-
TEMPLATE
- Template name.
-
- FLAGS
-
-
--api-version
API_VERSION
- Optional API version.
-
--format
FORMAT
- Specify a format for printed output. By default, a command-specific human-friendly output format is used. Setting this flag to one of the available options will serialize the result of the command in the chosen format and print it to stdout. Supported formats are: "json", "text", "yaml".
-
--help
- Display detailed help.
-
--project
PROJECT
- Google Cloud Platform project to use for this invocation.
-
--quiet
- Disable all interactive prompts when running gcloud commands. If input is required, defaults will be used, or an error will be raised.
-
--template-file
TEMPLATE_FILE
- Path to YAML or JSON file containing the template.
-
-h
- Print a summary help and exit.
-
gcloud preview deployment-manager templates create
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License , and code samples are licensed under the Apache 2.0 License . For details, see our Site Policies .
Last updated August 11, 2014.