Naming resources 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 orproduct. For example, resources on Compute Engine include but are notlimited to:
- Disks anddisk snapshots
- Images and image families
- Instance templates
- Instance groups
- Machine images
- Node groups andnode templates
- Compute Engine instances
To learnmore about resources, seeGlobal, regional, and zonal resources documentation.
Naming convention
When you create a new resource on Compute Engine, you have to provideproperties such as a name for the resource.
For resources on Compute Engine, the resourcename must meet the following format (unless specified differently in thedocumentation for creating that resource):
- Be 1-63 characters in length.
- Comply withRFC 1035 conventions.
- Match the regular expression
^[a-z]([-a-z0-9]*[a-z0-9])?. This means thatthe first character must be a lowercase letter, and all the followingcharacters must be hyphens, lowercase letters, or digits, except the lastcharacter, 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 whereit resides. However, you can reuse names across locations.
If thevmDnsSetting setting for the Compute Engine project resource isn'tset toZonalOnly then all VM names must be unique across the project. Westrongly recommend using thevmDnsSetting:ZonalOnly setting for yourprojects, not only so you can reuse VM names across zones and regions, but alsobecause it offers higher reliability by isolating failures in the DNSregistration to individual zones. For more information, seeZonal DNS names.
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 2025-12-09 UTC.