[ Web Proxy ]
URL:
Viewing: https://cloud.google.com/compute/docs/quickstart-mig [Back]  [Original]

Create a managed instance group (MIG)  |  Compute Engine  |  Google Cloud Documentation Skip to main content
Google Cloud Documentation [Google Cloud Documentation]
Send feedback Stay organized with collections Save and categorize content based on your preferences.

Create a managed instance group (MIG)

Learn how to create a managed instance group (MIG) in Compute Engine by using the Google Cloud console.

A MIG is a collection of virtual machine (VM) instances that you can manage as a single entity. MIGs support features such as autohealing, autoscaling, load balancing, multiple zone coverage, and stateful workloads.

Each VM in a MIG is based on an instance template. You need to create an instance template before you create a MIG.


To follow step-by-step guidance for this task directly in the Google Cloud console, click Guide me:

Guide me


Before you begin

  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.
    Note: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.

    Go to project selector

  3. If you're using an existing project for this guide, verify that you have the permissions required to complete this guide. If you created a new project, then you already have the required permissions.

  4. Verify that billing is enabled for your Google Cloud project.

  5. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.
    Note: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.

    Go to project selector

  6. If you're using an existing project for this guide, verify that you have the permissions required to complete this guide. If you created a new project, then you already have the required permissions.

  7. Verify that billing is enabled for your Google Cloud project.

  8. Enable the Compute Engine API.

    Enable the API

Required roles

To get the permissions that you need to create an instance template and a MIG, ask your administrator to grant you the Compute Instance Admin (v1) (roles/compute.instanceAdmin.v1) IAM role on your project. For more information about granting roles, see Manage access to projects, folders, and organizations.

This predefined role contains the permissions required to create an instance template and a MIG. To see the exact permissions that are required, expand the Required permissions section:

Required permissions

The following permissions are required to create an instance template and a MIG:

You might also be able to get these permissions with custom roles or other predefined roles.

Create an instance template

  1. In the Google Cloud console, go to the Instance templates page.

    Go to Instance templates

  2. Click Create instance template.

  3. To create a template that uses an Ubuntu OS, perform the following steps:

    1. In the Boot disk section, click Change.

    2. In the Boot disk pane that appears, in the Operating system list, select Ubuntu.

    3. Click Select.

    The template applies these settings to all the VMs that are created using this template. Note the name of the template, which you use later in the tutorial.

  4. To create the instance template, click Create.

Allow a few minutes for Compute Engine to create the template. When the template is ready, it's listed on the Instance templates page.

Create a MIG by using the instance template

  1. Go to the Instance groups page.

    Go to Instance groups

  2. Click Create instance group, and then perform the following steps:

    1. In the Name field, accept the default name or enter quickstart-instance-group-1.

    2. In the Instance template list, select the instance template that you created earlier.

    3. In the Location section, ensure that Single zone is selected.

    4. In the Region field, select a region where you want to create the MIG.

    5. In the Autoscaling section, accept the default settings unless you need to modify them.

  3. To create the MIG, click Create.

Allow a few minutes for Compute Engine to create the group and its VMs. After the group is ready, it's listed on the Instance groups page.

You have successfully created a managed instance group.

Clean up

To avoid incurring charges to your Google Cloud account for the resources used on this page, follow these steps.

Delete the resources

If you used an existing Google Cloud project, delete the resources that you created to avoid incurring charges to your account:

  1. Go to the Instance groups page.

    Go to Instance groups

  2. Select the instance group that you want to delete.

  3. Click Delete.

  4. When you're prompted, enter the required value, and then click Delete.

Delete the project

The easiest way to eliminate billing is to delete the project that you created for the tutorial.

To delete the project:

    Caution: Deleting a project has the following effects:
    • Everything in the project is deleted. If you used an existing project for the tasks in this document, when you delete it, you also delete any other work you've done in the project.
    • Custom project IDs are lost. When you created this project, you might have created a custom project ID that you want to use in the future. To preserve the URLs that use the project ID, such as an appspot.com URL, delete selected resources inside the project instead of deleting the whole project.

    If you plan to explore multiple architectures, tutorials, or quickstarts, reusing projects can help you avoid exceeding project quota limits.

  1. In the Google Cloud console, go to the Manage resources page.

    Go to Manage resources

  2. In the project list, select the project that you want to delete, and then click Delete.
  3. In the dialog, type the project ID, and then click Shut down to delete the project.

What's next

Send feedback

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-08-12 UTC.

Need to tell us more? [[["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 2026-08-12 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page