gcloud alpha compute tpus tpu-vm service-identity create Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud alpha compute tpus tpu-vm service-identity create - create a Cloud TPU VM service identity for a project
- SYNOPSIS
gcloud alpha compute tpus tpu-vm service-identity create[--zone=ZONE][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(ALPHA)Create a Cloud TPU VM service identity for a project.The Cloud TPU VM creates a service identity (Google-owned service account) formanagement of resources when the first Cloud TPU VM is created in a projectafter TPU service activation. However, there are cases where the serviceidentity may need to be created beforehand to grant specific IAM permissions toit, like access to a Google Cloud Storage bucket. This method generates theservice account without need to first create a Cloud TPU VM.
This command generates a service identity valid for Cloud TPU VMs across allzones in a project. The zone is required (either set in the gcloud configdefaults, as an environment variable, or
--zoneflag), but theservice identity generated will work across all Cloud TPU VM zones.- EXAMPLES
- To generate a Cloud TPU VM service identity for a project (using zone
europe-west4-a), run:gcloudalphacomputetpustpu-vmservice-identitycreate--zone=europe-west4-a - FLAGS
- Location resource - Zone to use for the request.
If not specified, will use the value of the [compute/zone] property in thecurrent gcloud configuration. This represents a Cloud resource. (NOTE) Someattributes are not given arguments in this group but can be set in other ways.
To set the
projectattribute:- provide the argument
--zoneon the command line with a fullyspecified name; - set the property
compute/zonewith a fully specified name; - provide the argument
--projecton the command line; - set the property
core/project.
- provide the argument
--zone=ZONE- ID of the location or fully qualified identifier for the location.
To set the
zoneattribute:- provide the argument
--zoneon the command line; - set the property
compute/zone.
- provide the argument
- Location resource - Zone to use for the request.
- 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-vmservice-identitycreate
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.