Stay organized with collections
Save and categorize content based on your preferences.
This page describes the naming convention for Compute Engine resources.
Resources are the fundamental components that make up a Cloud service or
product. For example, resources on Compute Engine include but are not
limited to:
When you create a new resource on Compute Engine, you have to provide
properties such as a name for the resource.
For resources on Compute Engine, the resource
name must meet the following format (unless specified differently in the
documentation for creating that resource):
Match the regular expression ^[a-z]([-a-z0-9]*[a-z0-9])?. This means that
the first character must be a lowercase letter, and all the following
characters must be hyphens, lowercase letters, or digits, except the last
character, which cannot be a hyphen.
Name uniqueness
In general, resource names must be unique within a location within a project.
For example, an external IP address name must be unique within the region where
it resides. However, you can reuse names across locations.
If the vmDnsSetting setting for the Compute Engine project resource isn't
set to ZonalOnly then all VM names must be unique across the project. We
strongly recommend using the vmDnsSetting:ZonalOnly setting for your
projects, not only so you can reuse VM names across zones and regions, but also
because it offers higher reliability by isolating failures in the DNS
registration to individual zones. For more information, see
Zonal DNS names.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-26 UTC."],[[["\u003cp\u003eThis page outlines the naming conventions for Compute Engine resources, which are fundamental components of the cloud service.\u003c/p\u003e\n"],["\u003cp\u003eResource names must be 1-63 characters long, adhere to RFC 1035 conventions, and follow a specific regular expression pattern starting with a lowercase letter and excluding hyphens as the last character.\u003c/p\u003e\n"],["\u003cp\u003eResource names must generally be unique within a location in a project, but they can be reused across different locations.\u003c/p\u003e\n"],["\u003cp\u003eWhen \u003ccode\u003evmDnsSetting\u003c/code\u003e is not set to \u003ccode\u003eZonalOnly\u003c/code\u003e, all VM names must be unique across the project, whereas using \u003ccode\u003eZonalOnly\u003c/code\u003e allows name reuse and provides higher reliability.\u003c/p\u003e\n"]]],[],null,["*** ** * ** ***\n\nThis page describes the naming convention for Compute Engine resources.\n\nResources are the fundamental components that make up a Cloud service or\nproduct. For example, resources on Compute Engine include but are not\nlimited to:\n\n- [Disks](/compute/docs/disks) and [disk snapshots](/compute/docs/disks/create-snapshots)\n- [Images and image families](/compute/docs/images)\n- [Instance templates](/compute/docs/instance-templates)\n- [Instance groups](/compute/docs/instance-groups)\n- [Machine images](/compute/docs/machine-images)\n- [Node groups](/compute/docs/nodes) and [node templates](/compute/docs/nodes)\n- [Compute Engine instances](/compute/docs/instances)\n\nTo learn\nmore about resources, see\n[Global, regional, and zonal resources documentation](/compute/docs/regions-zones/global-regional-zonal-resources).\n\nNaming convention\n\nWhen you create a new resource on Compute Engine, you have to provide\nproperties such as a name for the resource.\n\nFor resources on Compute Engine, the resource\nname must meet the following format (unless specified differently in the\ndocumentation for creating that resource):\n\n- Be 1-63 characters in length.\n- Comply with [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt) conventions.\n- Match the regular expression `^[a-z]([-a-z0-9]*[a-z0-9])?`. This means that the first character must be a lowercase letter, and all the following characters must be hyphens, lowercase letters, or digits, except the last character, which cannot be a hyphen.\n\nName uniqueness\n\nIn general, resource names must be unique within a location within a project.\nFor example, an external IP address name must be unique within the region where\nit resides. However, you can reuse names across locations.\n\nIf the `vmDnsSetting` setting for the Compute Engine project resource isn't\nset to `ZonalOnly` then all VM names must be unique across the project. We\n*strongly recommend* using the `vmDnsSetting:ZonalOnly` setting for your\nprojects, not only so you can reuse VM names across zones and regions, but also\nbecause it offers higher reliability by isolating failures in the DNS\nregistration to individual zones. For more information, see\n[Zonal DNS names](/compute/docs/networking/zonal-dns)."]]