확정 인스턴스 템플릿을 사용하면 VM에 설치할 서드 파티 서비스 또는 앱의 유형을 명확하게 알 수 있습니다. 이렇게 하면 인스턴스 템플릿이 항상 동일한 구성으로 VM을 만들 수 있습니다. 예를 들어 템플릿에 앱을 가져오는 시작 스크립트가 있는 경우 템플릿의 시작 스크립트에서 원하는 앱 버전을 지정할 수 있습니다.
인스턴스 템플릿은 리전 및 전역 리소스로 모두 사용할 수 있습니다.
여러 리전에서 인스턴스 템플릿을 재사용해야 하는 경우가 아니라면 전역 인스턴스 템플릿보다 지역 인스턴스 템플릿을 사용하는 것이 좋습니다.
다음 표에서는 지역 인스턴스 템플릿과 전역 인스턴스 템플릿을 비교합니다.
리전 인스턴스 템플릿
전역 인스턴스 템플릿
범위
템플릿은 템플릿의 리전에서만 사용할 수 있습니다.
이 템플릿은 모든 리전에서 사용할 수 있습니다.
안정성
하드웨어 오류는 템플릿의 리전으로 격리됩니다.
하드웨어 오류는 템플릿이 사용되는 모든 리전에 영향을 줄 수 있습니다.
사용 사례
리전 간 종속 항목을 줄입니다.
특정 리전에서 데이터 상주를 실현합니다. 예를 들어 데이터의 물리적 위치에 관한 규정 준수 요구사항을 충족하기 위해
전역 인스턴스 템플릿을 재사용하여 여러 리전에서 VM, MIG, 예약을 만듭니다.
인스턴스 템플릿에서 영역 또는 리전 리소스 사용
인스턴스 템플릿에서 해당 템플릿의 사용을 해당 리소스가 있는 영역으로 제한하는 영역별 리소스를 지정할 수 있습니다. 마찬가지로 전역 인스턴스 템플릿에서 리전 리소스를 지정하면 템플릿이 해당 리전으로 제한됩니다. 예를 들어 us-central1-a의 읽기 전용 Persistent Disk를 인스턴스 템플릿에 포함시킬 경우, 해당 Persistent Disk는 us-central1-a 영역에만 존재하므로 다른 영역에서는 해당 템플릿을 사용할 수 없습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eInstance templates are used to save VM configurations, including machine type, boot disk image, labels, and startup scripts, for quick VM creation or reservations.\u003c/p\u003e\n"],["\u003cp\u003eInstance templates are utilized for creating individual VMs, managed instance groups (MIGs), and reservations for VMs, while MIGs must be created using an instance template.\u003c/p\u003e\n"],["\u003cp\u003eInstance templates cannot be updated after creation; instead, you can create new templates based on existing VMs or templates, or override properties when creating new VMs.\u003c/p\u003e\n"],["\u003cp\u003eDeterministic instance templates ensure VMs are created with identical configurations, specifically when third-party apps or services are involved, by specifying exact versions.\u003c/p\u003e\n"],["\u003cp\u003eRegional instance templates are recommended over global templates unless cross-region use is necessary, offering better reliability by isolating hardware errors and allowing for regional data residency, while both can be limited by the presence of zonal resources.\u003c/p\u003e\n"]]],[],null,["# Instance templates\n\n*** ** * ** ***\n\nThis document describes what an instance template is, when to use an instance\ntemplate, and what a deterministic instance template is. It also provides a\ncomparison between regional and global instance templates.\n\nAn instance template is a convenient way to save a virtual machine (VM)\ninstance's configuration that includes machine type, boot disk image, labels,\nstartup script, and other VM properties.\n\nYou can use an instance template to do the following:\n\n- Create\n [individual VMs](/compute/docs/instances/create-vm-from-instance-template).\n\n- Create VMs in a\n [managed instance group (MIG)](/compute/docs/instance-groups/creating-groups-of-managed-instances).\n\n- Create\n [reservations for VMs](/compute/docs/instances/choose-reservation-type).\n\nTo learn how to create an instance template, see\n[Create instance templates](/compute/docs/instance-templates/create-instance-templates).\n\nWhen to use instance templates\n------------------------------\n\nUse instance templates any time you want to quickly create VMs or reservations\nfor VMs based off of a pre-existing VM property. If you want to create a group\nof identical VMs (a MIG), then you must create the MIG using an instance\ntemplate.\n\nHow to update instance templates\n--------------------------------\n\nInstance templates are designed to create VMs with identical configurations. You\ncan't update instance templates after they're created. Instead, do one of the\nfollowing:\n\n- Create a new instance template as follows:\n\n - [Create an instance template based on an existing VM](/compute/docs/instance-templates/create-instance-templates#based-on-existing-instance).\n\n - [Create an instance template based on an existing template](/compute/docs/instance-templates/create-instance-templates#based-on-existing-template).\n\n- [Create VMs while overriding the instance template's properties](/compute/docs/instances/create-vm-from-instance-template#creating_a_vm_instance_from_an_instance_template_with_overrides).\n\nUse deterministic instance templates to ensure identical VMs\n------------------------------------------------------------\n\nDeterministic instance templates make explicitly clear the type of third-party\nservices or apps to install on your VMs. This helps to ensure that your instance\ntemplate always creates VMs with an identical configuration. For example, if your\ntemplate has a startup script that fetches an app, you can specify the version\nof the app that you want in your template's startup script.\n\nFor more information, see\n[Deterministic instance templates](/compute/docs/instance-templates/deterministic-instance-templates).\n\nRegional and global instance templates\n--------------------------------------\n\nInstance templates are available both as\n[regional](/compute/docs/regions-zones/global-regional-zonal-resources#regionalresources)\nand\n[global resources](/compute/docs/regions-zones/global-regional-zonal-resources#globalresources).\nUnless you need to reuse an instance template across multiple regions, Google\nrecommends using regional instance templates over global instance templates.\n\nThe following table provides a comparison between regional and global instance\ntemplates:\n\n### Use of zonal or regional resources in instance templates\n\nIn an instance template, you might specify zonal resources, which restricts the\nuse of that template to the zone where that resource resides. Similarly, if you\nspecify a regional resource in a global instance template, the template is\nrestricted to that region. For example, if you include a read-only Persistent Disk\nfrom `us-central1-a` in your instance template, you can't use that template in\nany other zone because that specific Persistent Disk exists only in zone\n`us-central1-a`.\n\nFor more information about zonal resources, see\n[Regions and zones](/compute/docs/regions-zones#available).\n\nHow to specify instance templates\n---------------------------------\n\nWhen creating resources that are based on an instance template, depending on the\ninterface that you're using, you might need to specify the full or\npartial URL of the instance template---for example:\n\n- Full URL: `https://www.googleapis.com/compute/v1/projects/example-project/regions/us-central1/instanceTemplates/1234567890`\n- Partial URL: `projects/example-project/regions/us-central1/instanceTemplates/1234567890`\n\nYou can specify either the ID or the name of the instance template. Google\nrecommends that you specify the ID because, unlike names, instance template IDs\ncan't be reused. This approach helps to ensure that the resources that you\ncreate from the template have the properties that you intend.\n\nTo view the template ID of an instance, see\n[Get information about an instance template](/docs/instance-templates/get-list-delete-instance-templates#get_information_about_an_instance_template).\n\nPricing\n-------\n\nThere is no additional charge for using instance templates. You are charged\nfor the resources that you create based on the templates.\nFor Compute Engine pricing information, see [Pricing](https://cloud.google.com/compute/all-pricing).\n\nWhat's next\n-----------\n\n- [Create an instance template](/compute/docs/instance-templates/create-instance-templates)\n from scratch, based on an existing instance, or based on an existing instance\n template.\n\n- Use an instance template to\n [create a VM](/compute/docs/instances/create-vm-from-instance-template).\n\n- Use an instance template to\n [create a MIG](/compute/docs/instance-groups/creating-groups-of-managed-instances)\n or [update an existing MIG](/compute/docs/instance-groups/updating-migs).\n\n- Use an instance template to\n [create a reservation for VMs](/compute/docs/instances/choose-reservation-type)."]]