- NAME
-
- gcloud alpha compute instance-templates export - export an instance template
- SYNOPSIS
-
-
gcloud alpha compute instance-templates exportNAME[--destination=DESTINATION] [--endpoint-mode=ENDPOINT_MODE] [--global|--region=REGION] [GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
-
(ALPHA)Exports the configuration for the instance template to a file. This configuration can be imported at a later time. - EXAMPLES
-
An instance template can be exported by running:
gcloud alpha compute instance-templates export NAME --destination=<path-to-file> - POSITIONAL ARGUMENTS
-
NAME- Name of the instance template to export.
- FLAGS
-
--destination=DESTINATION- Path to a YAML file where the configuration will be exported. Alternatively, you may omit this flag to write to standard output. For a schema describing the export/import format, see: $CLOUDSDKROOT/lib/googlecloudsdk/schemas/compute/alpha/InstanceTemplate.yaml.
--endpoint-mode=ENDPOINT_MODE-
Specifies endpoint mode for a given command. Regional endpoints provide enhanced
data residency and reliability by ensuring your request is handled entirely
within the specified Google Cloud region. This differs from global endpoints,
which may process parts of the request outside the target region. Overrides the
default
regional/endpoint_modeproperty value for this command invocation.ENDPOINT_MODEmust be one of:global- (Default) Use global rather than regional endpoints.
regional- Only use regional endpoints. An error will be raised if a regional endpoint is not available for a given command.
regional-preferred- Use regional endpoints when available, otherwise use global endpoints. Recommended for most users.
-
At most one of these can be specified:
--global- If set, the instance template is global.
--region=REGION-
Region of the instance template to export. Overrides the default
compute/regionproperty value for this command invocation.
- GCLOUD WIDE FLAGS
-
These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$ gcloud helpfor details. - REGIONAL ENDPOINTS
-
This command supports regional endpoints. To use regional endpoints for this
command, use the
--endpoint-mode=regional-preferredflag. To use regional endpoints by default, run$ gcloud config set regional/endpoint_mode regional-preferred. - NOTES
-
This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct project,
you might be trying to access an API with an invitation-only early access
allowlist. These variants are also available:
gcloud compute instance-templates exportgcloud beta compute instance-templates exportgcloud preview compute instance-templates export
gcloud alpha compute instance-templates export
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-10-20 UTC.