gcloud alpha compute tpus tpu-vm update Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud alpha compute tpus tpu-vm update - update a Cloud TPU VM node
- SYNOPSIS
gcloud alpha compute tpus tpu-vm update(TPU:--zone=ZONE)[--add-tags=[TAGS,…]][--async][--description=DESCRIPTION][--internal-ips][--update-labels=[KEY=VALUE,…]][--clear-labels|--remove-labels=[KEY,…]][--clear-tags|--remove-tags=[TAG,…]][--metadata-from-file=[KEY=VALUE,…] |--update-metadata=[KEY=VALUE,…]--clear-metadata|--remove-metadata=[KEY,…]][--worker=[WORKER,…]--attach-disk=[SOURCE=DATA_DISK,…] |--detach-disk=DATA_DISK][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(ALPHA)Update a Cloud TPU VM node.- EXAMPLES
- To modify a TPU VM node with ID
my-tpuin the default user projectand compute/zone by updating the description to "A new description", run:gcloudalphacomputetpustpu-vmupdatemy-tpu--description="A new description"To modify a TPU VM node with ID
my-tpuin the default user project,network and compute/zone (with other defaults supplied by API) by adding labelsk0, with valuevalue0and labelk1withvaluevalue1and removing labels with keyk2, run:gcloudalphacomputetpustpu-vmupdatemy-tpu--update-labels=k0=value0,k1=value1--remove-labels=k2Labels can be used to identify the TPU VM node. To list TPU VM nodes with the
k1:value1label, run:gcloudalphacomputetpustpu-vmlist--filter='labels.k1=value1'To list only the labels when describing a resource, use
--formattofilter the result:gcloudalphacomputetpustpu-vmdescribemy-tpu--format="default(labels)" - POSITIONAL ARGUMENTS
- Tpu resource - Name of the Cloud TPU VM node to update. The arguments in thisgroup can be used to specify the attributes of this resource. (NOTE) Someattributes are not given arguments in this group but can be set in other ways.
To set the
projectattribute:- provide the argument
tpuon the command line with a fully specifiedname; - provide the argument
--projecton the command line; - set the property
core/project.
This must be specified.
TPU- ID of the tpu or fully qualified identifier for the tpu.
To set the
tpuattribute:- provide the argument
tpuon the command line.
This positional argument must be specified if any of the other arguments in thisgroup are specified.
- provide the argument
--zone=ZONE- Zone of the Cloud TPU.
If not specified, will use
defaultcompute/zone.To set thezoneattribute:- provide the argument
tpuon the command line with a fully specifiedname; - provide the argument
--zoneon the command line; - set the property
compute/zone.
- provide the argument
- provide the argument
- Tpu resource - Name of the Cloud TPU VM node to update. The arguments in thisgroup can be used to specify the attributes of this resource. (NOTE) Someattributes are not given arguments in this group but can be set in other ways.
- FLAGS
--add-tags=[TAGS,…]- Tags to add to the TPU Node. Tags are used to identify valid sources or targetsfor network firewalls. Seehttps://cloud.google.com/vpc/docs/add-remove-network-tagsfor more details.
--async- Return immediately, without waiting for the operation in progress to complete.
--description=DESCRIPTION- Text description of the TPU.
--internal-ips- Indicate that the IP addresses for the node should be internal. The default isthat external IP addresses will be associated with the TPU workers.
--update-labels=[KEY=VALUE,…]- Resource labels to update that represent user-provided metadata. If a labelexists, its value is modified. Otherwise, a new label is created. Seehttps://cloud.google.com/compute/docs/labeling-resourcesfor details.
- At most one of these can be specified:
--clear-labels- Remove all labels. If
--update-labelsis also specified then--clear-labelsis applied first.For example, to remove all labels:
gcloudalphacomputetpustpu-vmupdate--clear-labelsTo remove all existing labels and create two new labels, 'foo' and 'baz':
gcloudalphacomputetpustpu-vmupdate--clear-labels--update-labelsfoo=bar,baz=qux --remove-labels=[KEY,…]- List of label keys to remove. If a label does not exist it is silently ignored.If
--update-labelsis also specified then--update-labelsis applied first.
- At most one of these can be specified:
--clear-tags- Remove all tags. If
--add-tagsis also specified then--clear-tagsis applied first.For example, to remove all tags:
gcloudalphacomputetpustpu-vmupdate--clear-tagsTo remove all existing tags and create two new tags, 'foo' and 'bar':
gcloudalphacomputetpustpu-vmupdate--clear-tags--add-tagsfoo,bar --remove-tags=[TAG,…]- List of tags to remove. If a tag does not exist it is silently ignored. If
--add-tagsis also specified then--add-tagsisapplied first.
- At most one of these can be specified:
--metadata-from-file=[KEY=VALUE,…]- Same as
--metadataexcept the value for the entry will be read froma local file. Example:--metadata-from-file='key1=value1.txt' - Or at least one of these can be specified:
--update-metadata=[KEY=VALUE,…]- List of comma-separated metadata key-value pairs for the Cloud TPU VM node. If akey exists, its value is modified. Otherwise, a new key-value pair is created.
- At most one of these can be specified:
--clear-metadata- Remove all metadata. If
--update-metadatais also specified then--clear-metadatais applied first.For example, to remove all metadata:
gcloudalphacomputetpustpu-vmupdate--clear-metadataTo remove all existing metadata and create two new metadata key-value pairs,'foo=bar' and 'baz=qux':
gcloudalphacomputetpustpu-vmupdate--clear-metadata--update-metadatafoo=bar,baz=qux --remove-metadata=[KEY,…]- List of comma-separated metadata keys to remove. If a key does not exist it issilently ignored. If
--update-metadatais also specified then--update-metadatais applied first.
--worker=[WORKER,…]- List of worker IDs to apply attach/detach disk to. If not specified, the updateis applied to all workers. Only numeric values are allowed. The only exceptionis 'all'.
--attach-diskand--workercan be used to specifywhich workers to attach the disk to. For example:gcloudalphacomputetpustpu-vmupdateexample-tpu--attach-disksource=projects/my-project/zones/us-central1-c/disks/my-disk,mode=read-only--zone=us-central1-c--worker=0,1attaches the disk named 'projects/my-project/zones/us-central1-c/disks/my-disk'to worker 0 and 1 of a TPU VM named 'example-tpu' in read-only mode in zone
us-central1-c. if--workeris not specified or--worker=allis specified, the disk is attached to all workers.--detach-diskand--workercan be used to specifywhich workers to detach the disk from. For example:gcloudalphacomputetpustpu-vmupdateexample-tpu--detach-disk=projects/my-project/zones/us-central1-c/disks/my-disk--zone=us-central1-c--worker=0,1detaches the disk named 'projects/my-project/zones/us-central1-c/disks/my-disk'from worker 0 and 1 of a TPU VM named 'example-tpu' in zone
us-central1-c. if--workeris not specified or--worker=allis specified, the disk is attached to all workers. - At most one of these can be specified:
--attach-disk=[SOURCE=DATA_DISK,…]- Attach a data disk to the TPU VM. For example,
gcloudalphacomputetpustpu-vmupdateexample-tpu--attach-disksource=projects/my-project/zones/us-central1-c/disks/my-disk,mode=read-only--zone=us-central1-cattaches the disk named 'projects/my-project/zones/us-central1-c/disks/my-disk'to a TPU VM named 'example-tpu' in read-only mode in zone
us-central1-c.The following keys are allowed:
source- Specify the full path to an existing disk. Required. The disk must be in thesame zone.
mode- Specify the mode in which to attach this disk. Valid options are 'read-write','read-only'. If not specified, the default is 'read-write'.
--detach-disk=DATA_DISK- Detach a data disk from the TPU VM. For example,
This flag must be repeated to provide multiple data disks. For example:
gcloudalphacomputetpustpu-vmupdateexample-tpu--detach-disk=projects/my-project/zones/us-central1-c/disks/my-disk--zone=us-central1-cdetaches the disk named 'projects/my-project/zones/us-central1-c/disks/my-disk'from a TPU VM named 'example-tpu' in zone
us-central1-c.
- 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. - API REFERENCE
- This command uses the
tpu/v2alpha1API. The full documentation forthis API can be found at:https://cloud.google.com/tpu/ - NOTES
- This command is currently in alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. This variant is also available:
gcloudcomputetpustpu-vmupdate
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-01-21 UTC.