Saat membuat resource baru di Compute Engine, Anda harus memberikan properti seperti nama untuk resource tersebut.
Untuk resource di Compute Engine, nama
resource harus memenuhi format berikut (kecuali jika ditentukan secara berbeda dalam
dokumentasi untuk membuat resource tersebut):
Cocok dengan ekspresi reguler ^[a-z]([-a-z0-9]*[a-z0-9])?. Artinya, karakter pertama harus berupa huruf kecil, dan semua karakter berikutnya harus berupa tanda hubung, huruf kecil, atau angka, kecuali karakter terakhir yang tidak boleh berupa tanda hubung.
Keunikan nama
Secara umum, nama resource harus unik dalam sebuah lokasi dalam project.
Misalnya, nama alamat IP eksternal harus unik dalam region tempat alamat tersebut berada. Namun, Anda dapat kembali menggunakan nama di seluruh lokasi.
Jika setelan vmDnsSetting untuk resource project Compute Engine tidak ditetapkan ke ZonalOnly, semua nama VM harus bersifat unik di seluruh project. Kami sangat merekomendasikan penggunaan setelan vmDnsSetting:ZonalOnly untuk project Anda, bukan hanya agar Anda dapat menggunakan kembali nama VM di seluruh zona dan region, tetapi juga karena setelan ini menawarkan keandalan yang lebih tinggi dengan mengisolasi kegagalan dalam pendaftaran DNS ke zona individu. Untuk mengetahui informasi selengkapnya, lihat Nama DNS Zona.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-19 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)."]]