HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/394/help/man/man1/gcloud_compute_instance-groups_managed_create.1
.TH "GCLOUD_COMPUTE_INSTANCE\-GROUPS_MANAGED_CREATE" 1



.SH "NAME"
.HP
gcloud compute instance\-groups managed create \- create a Compute Engine managed instance group



.SH "SYNOPSIS"
.HP
\f5gcloud compute instance\-groups managed create\fR \fINAME\fR \fB\-\-size\fR=\fISIZE\fR \fB\-\-template\fR=\fITEMPLATE\fR [\fB\-\-base\-instance\-name\fR=\fIBASE_INSTANCE_NAME\fR] [\fB\-\-default\-action\-on\-vm\-failure\fR=\fIACTION_ON_VM_FAILURE\fR] [\fB\-\-description\fR=\fIDESCRIPTION\fR] [\fB\-\-[no\-]force\-update\-on\-repair\fR] [\fB\-\-initial\-delay\fR=\fIINITIAL_DELAY\fR] [\fB\-\-instance\-redistribution\-type\fR=\fITYPE\fR] [\fB\-\-instance\-selection\fR=\fIname\fR=\fINAME\fR,\fImachine\-type\fR=\fIMACHINE_TYPE\fR[,\fImachine\-type\fR=\fIMACHINE_TYPE\fR...][,\fIrank\fR=\fIRANK\fR]] [\fB\-\-instance\-selection\-machine\-types\fR=[\fIMACHINE_TYPE\fR,...]] [\fB\-\-list\-managed\-instances\-results\fR=\fIMODE\fR] [\fB\-\-standby\-policy\-initial\-delay\fR=\fISTANDBY_POLICY_INITIAL_DELAY\fR] [\fB\-\-standby\-policy\-mode\fR=\fISTANDBY_POLICY_MODE\fR] [\fB\-\-stateful\-disk\fR=[\fIauto\-delete\fR=\fIAUTO\-DELETE\fR],[\fIdevice\-name\fR=\fIDEVICE\-NAME\fR]] [\fB\-\-stateful\-external\-ip\fR=[\fIenabled\fR],[\fIauto\-delete\fR=\fIAUTO\-DELETE\fR],[\fIinterface\-name\fR=\fIINTERFACE\-NAME\fR]] [\fB\-\-stateful\-internal\-ip\fR=[\fIenabled\fR],[\fIauto\-delete\fR=\fIAUTO\-DELETE\fR],[\fIinterface\-name\fR=\fIINTERFACE\-NAME\fR]] [\fB\-\-stopped\-size\fR=\fISTOPPED_SIZE\fR] [\fB\-\-suspended\-size\fR=\fISUSPENDED_SIZE\fR] [\fB\-\-target\-distribution\-shape\fR=\fISHAPE\fR] [\fB\-\-target\-pool\fR=[\fITARGET_POOL\fR,...]] [\fB\-\-workload\-policy\fR=\fIWORKLOAD_POLICY\fR] [\fB\-\-zones\fR=\fIZONE\fR,[\fIZONE\fR,...]] [\fB\-\-health\-check\fR=\fIHEALTH_CHECK\fR\ |\ \fB\-\-http\-health\-check\fR=\fIHTTP_HEALTH_CHECK\fR\ |\ \fB\-\-https\-health\-check\fR=\fIHTTPS_HEALTH_CHECK\fR] [\fB\-\-region\fR=\fIREGION\fR\ |\ \fB\-\-zone\fR=\fIZONE\fR] [\fB\-\-update\-policy\-max\-surge\fR=\fIMAX_SURGE\fR\ \fB\-\-update\-policy\-max\-unavailable\fR=\fIMAX_UNAVAILABLE\fR\ \fB\-\-update\-policy\-minimal\-action\fR=\fIUPDATE_POLICY_MINIMAL_ACTION\fR\ \fB\-\-update\-policy\-most\-disruptive\-action\fR=\fIUPDATE_POLICY_MOST_DISRUPTIVE_ACTION\fR\ \fB\-\-update\-policy\-replacement\-method\fR=\fIUPDATE_POLICY_REPLACEMENT_METHOD\fR\ \fB\-\-update\-policy\-type\fR=\fIUPDATE_TYPE\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]



.SH "DESCRIPTION"

\fBgcloud compute instance\-groups managed create\fR creates a Compute Engine
managed instance group.



.SH "EXAMPLES"

Running:

.RS 2m
$ gcloud compute instance\-groups managed create \e
example\-managed\-instance\-group \-\-zone=us\-central1\-a \e
\-\-template=example\-global\-instance\-template \-\-size=1
.RE

will create a managed instance group called 'example\-managed\-instance\-group'
in the \f5\fIus\-central1\-a\fR\fR zone with a global instance template resource
\'example\-global\-instance\-template'.

To use a regional instance template, specify the full or partial URL of the
template.

Running:

.RS 2m
$ gcloud compute instance\-groups managed create \e
example\-managed\-instance\-group \-\-zone=us\-central1\-a \e
\-\-template=projects/example\-project/regions/us\-central1/\e
instanceTemplates/example\-regional\-instance\-template \-\-size=1
.RE

will create a managed instance group called 'example\-managed\-instance\-group'
in the \f5\fIus\-central1\-a\fR\fR zone with a regional instance template
resource 'example\-regional\-instance\-template'.



.SH "POSITIONAL ARGUMENTS"

.RS 2m
.TP 2m
\fINAME\fR

Name of the managed instance group to create.


.RE
.sp

.SH "REQUIRED FLAGS"

.RS 2m
.TP 2m
\fB\-\-size\fR=\fISIZE\fR

Initial number of instances you want in this group.

.TP 2m
\fB\-\-template\fR=\fITEMPLATE\fR

Specifies the instance template to use when creating new instances. An instance
template is either a global or regional resource.


.RE
.sp

.SH "OPTIONAL FLAGS"

.RS 2m
.TP 2m
\fB\-\-base\-instance\-name\fR=\fIBASE_INSTANCE_NAME\fR

Base name to use for the Compute Engine instances that will be created with the
managed instance group. If not provided base instance name will be the prefix of
instance group name.

.TP 2m
\fB\-\-default\-action\-on\-vm\-failure\fR=\fIACTION_ON_VM_FAILURE\fR

Specifies the action that a MIG performs on a failed or an unhealthy VM. A VM is
marked as unhealthy when the application running on that VM fails a health
check. By default, the value of the flag is set to \f5\fIrepair\fR\fR.
\fIACTION_ON_VM_FAILURE\fR must be one of:

.RS 2m
.TP 2m
\fBdo\-nothing\fR
MIG does not repair a failed or an unhealthy VM.
.TP 2m
\fBrepair\fR
MIG automatically repairs a failed or an unhealthy VM.
.RE
.sp


.TP 2m
\fB\-\-description\fR=\fIDESCRIPTION\fR

An optional description for this group.

.TP 2m
\fB\-\-[no\-]force\-update\-on\-repair\fR

Specifies whether to apply the group's latest configuration when repairing a VM.
If you updated the group's instance template or per\-instance configurations
after the VM was created, then these changes are applied when VM is repaired. If
this flag is disabled with \f5\fI\-no\-force\-update\-on\-repair\fR\fR, then
updates are applied in accordance with the group's update policy type. By
default, this flag is disabled. Use \fB\-\-force\-update\-on\-repair\fR to
enable and \fB\-\-no\-force\-update\-on\-repair\fR to disable.

.TP 2m
\fB\-\-initial\-delay\fR=\fIINITIAL_DELAY\fR

Specifies the number of seconds that a new VM takes to initialize and run its
startup script. During a VM's initial delay period, the MIG ignores unsuccessful
health checks because the VM might be in the startup process. This prevents the
MIG from prematurely recreating a VM. If the health check receives a healthy
response during the initial delay, it indicates that the startup process is
complete and the VM is ready. The value of initial delay must be between 0 and
3600 seconds. The default value is 0. See $ gcloud topic datetimes for
information on duration formats.

.TP 2m
\fB\-\-instance\-redistribution\-type\fR=\fITYPE\fR

Specifies the type of the instance redistribution policy. An instance
redistribution type lets you enable or disable automatic instance redistribution
across zones to meet the group's target distribution shape.

An instance redistribution type can be specified only for a non\-autoscaled
regional managed instance group. By default it is set to \f5\fIproactive\fR\fR.

\fITYPE\fR must be one of:

.RS 2m
.TP 2m
\fBnone\fR
The managed instance group does not redistribute instances across zones.
.TP 2m
\fBproactive\fR
The managed instance group proactively redistributes instances to meet its
target distribution.
.RE
.sp


.TP 2m
\fB\-\-instance\-selection\fR=\fIname\fR=\fINAME\fR,\fImachine\-type\fR=\fIMACHINE_TYPE\fR[,\fImachine\-type\fR=\fIMACHINE_TYPE\fR...][,\fIrank\fR=\fIRANK\fR]

Named selection of machine types with an optional rank. For example,
\f5\-\-instance\-selection="name=instance\-selection\-1,machine\-type=e2\-standard\-8,machine\-type=t2d\-standard\-8,rank=0"\fR

.TP 2m
\fB\-\-instance\-selection\-machine\-types\fR=[\fIMACHINE_TYPE\fR,...]

Machine types that are used to create VMs in the managed instance group. If not
provided, the machine type specified in the instance template is used.

.TP 2m
\fB\-\-list\-managed\-instances\-results\fR=\fIMODE\fR

Pagination behavior for the group's listManagedInstances API method. This flag
does not affect the group's gcloud or console list\-instances behavior. By
default it is set to \f5\fIpageless\fR\fR. \fIMODE\fR must be one of:

.RS 2m
.TP 2m
\fBpageless\fR
Pagination is disabled for the group's listManagedInstances API method.
maxResults and pageToken query parameters are ignored and all instances are
returned in a single response.
.TP 2m
\fBpaginated\fR
Pagination is enabled for the group's listManagedInstances API method.
maxResults and pageToken query parameters are respected.
.RE
.sp


.TP 2m
\fB\-\-standby\-policy\-initial\-delay\fR=\fISTANDBY_POLICY_INITIAL_DELAY\fR

Specifies the number of seconds that the MIG should wait before suspending or
stopping a VM. The initial delay gives the initialization script the time to
prepare your VM for a quick scale out.

.TP 2m
\fB\-\-standby\-policy\-mode\fR=\fISTANDBY_POLICY_MODE\fR

Defines how a MIG resumes or starts VMs from a standby pool when the group
scales out. The default mode is \f5\fImanual\fR\fR. \fISTANDBY_POLICY_MODE\fR
must be one of:

.RS 2m
.TP 2m
\fBmanual\fR
MIG does not automatically resume or start VMs in the standby pool when the
group scales out.
.TP 2m
\fBscale\-out\-pool\fR
MIG automatically resumes or starts VMs in the standby pool when the group
scales out, and replenishes the standby pool afterwards.
.RE
.sp


.TP 2m
\fB\-\-stateful\-disk\fR=[\fIauto\-delete\fR=\fIAUTO\-DELETE\fR],[\fIdevice\-name\fR=\fIDEVICE\-NAME\fR]

Disks considered stateful by the instance group. Managed instance groups
preserve and reattach stateful disks on VM autohealing, update, and recreate
events.

Use this argument multiple times to attach more disks.

.RS 2m
.TP 2m
\fBdevice\-name\fR
(Required) Device name of the disk to mark stateful.

.TP 2m
\fBauto\-delete\fR
(Optional) Specifies the auto deletion policy of the stateful disk. The
following options are available:
.RS 2m
.IP "\(bu" 2m
\f5\fInever\fR\fR: (Default) Never delete this disk. Instead, detach the disk
when its instance is deleted.
.IP "\(bu" 2m
\f5\fIon\-permanent\-instance\-deletion\fR\fR: Delete the stateful disk when the
instance that it's attached to is permanently deleted from the group; for
example, when the instance is deleted manually or when the group size is
decreased.
.RE
.sp

.RE
.sp
.TP 2m
\fB\-\-stateful\-external\-ip\fR=[\fIenabled\fR],[\fIauto\-delete\fR=\fIAUTO\-DELETE\fR],[\fIinterface\-name\fR=\fIINTERFACE\-NAME\fR]

External IPs considered stateful by the instance group. Managed instance groups
preserve stateful IPs on VM autohealing, update, and recreate events.

Use this argument multiple times to make more external IPs stateful.

At least one of the following is required:

.RS 2m
.TP 2m
\fBenabled\fR
Marks the IP address as stateful. The network interface named \f5\fInic0\fR\fR
is assumed by default when \f5\fIinterface\-name\fR\fR is not specified. This
flag can be omitted when \f5\fIinterface\-name\fR\fR is provided explicitly.


.TP 2m
\fBinterface\-name\fR
Marks the IP address from this network interface as stateful. This flag can be
omitted when \f5\fIenabled\fR\fR is provided.


Additional arguments:

.TP 2m
\fBauto\-delete\fR
(Optional) Prescribes what should happen to an associated static Address
resource when a VM instance is permanently deleted. Regardless of the value of
the delete rule, stateful IP addresses are always preserved on instance
autohealing, update, and recreation operations. The following options are
available:
.RS 2m
.IP "\(bu" 2m
\f5\fInever\fR\fR: (Default) Never delete the static IP address. Instead,
unassign the address when its instance is permanently deleted and keep the
address reserved.
.IP "\(bu" 2m
\f5\fIon\-permanent\-instance\-deletion\fR\fR: Delete the static IP address
reservation when the instance that it's assigned to is permanently deleted from
the instance group; for example, when the instance is deleted manually or when
the group size is decreased.
.RE
.sp

.RE
.sp
.TP 2m
\fB\-\-stateful\-internal\-ip\fR=[\fIenabled\fR],[\fIauto\-delete\fR=\fIAUTO\-DELETE\fR],[\fIinterface\-name\fR=\fIINTERFACE\-NAME\fR]

Internal IPs considered stateful by the instance group. Managed instance groups
preserve stateful IPs on VM autohealing, update, and recreate events.

Use this argument multiple times to make more internal IPs stateful.

At least one of the following is required:

.RS 2m
.TP 2m
\fBenabled\fR
Marks the IP address as stateful. The network interface named \f5\fInic0\fR\fR
is assumed by default when \f5\fIinterface\-name\fR\fR is not specified. This
flag can be omitted when \f5\fIinterface\-name\fR\fR is provided explicitly.


.TP 2m
\fBinterface\-name\fR
Marks the IP address from this network interface as stateful. This flag can be
omitted when \f5\fIenabled\fR\fR is provided.


Additional arguments:

.TP 2m
\fBauto\-delete\fR
(Optional) Prescribes what should happen to an associated static Address
resource when a VM instance is permanently deleted. Regardless of the value of
the delete rule, stateful IP addresses are always preserved on instance
autohealing, update, and recreation operations. The following options are
available:
.RS 2m
.IP "\(bu" 2m
\f5\fInever\fR\fR: (Default) Never delete the static IP address. Instead,
unassign the address when its instance is permanently deleted and keep the
address reserved.
.IP "\(bu" 2m
\f5\fIon\-permanent\-instance\-deletion\fR\fR: Delete the static IP address
reservation when the instance that it's assigned to is permanently deleted from
the instance group; for example, when the instance is deleted manually or when
the group size is decreased.
.RE
.sp

.RE
.sp
.TP 2m
\fB\-\-stopped\-size\fR=\fISTOPPED_SIZE\fR

Specifies the target size of stopped VMs in the group.

.TP 2m
\fB\-\-suspended\-size\fR=\fISUSPENDED_SIZE\fR

Specifies the target size of suspended VMs in the group.

.TP 2m
\fB\-\-target\-distribution\-shape\fR=\fISHAPE\fR

Specifies how a regional managed instance group distributes its instances across
zones within the region. The default shape is \f5\fIeven\fR\fR. \fISHAPE\fR must
be one of:

.RS 2m
.TP 2m
\fBany\fR
The group picks zones for creating VM instances to fulfill the requested number
of VMs within present resource constraints and to maximize utilization of unused
zonal reservations. Recommended for batch workloads that do not require high
availability.
.TP 2m
\fBany\-single\-zone\fR
The group schedules all instances within a single zone. The zone is chosen based
on hardware support, current resources availability, and matching reservations.
The group might not be able to create the requested number of VMs in case of
zonal resource availability constraints. Recommended for workloads requiring
extensive communication between VMs.
.TP 2m
\fBbalanced\fR
The group prioritizes acquisition of resources, scheduling VMs in zones where
resources are available while distributing VMs as evenly as possible across
selected zones to minimize the impact of zonal failure. Recommended for highly
available serving or batch workloads that do not require autoscaling.
.TP 2m
\fBeven\fR
The group schedules VM instance creation and deletion to achieve and maintain an
even number of managed instances across the selected zones. The distribution is
even when the number of managed instances does not differ by more than 1 between
any two zones. Recommended for highly available serving workloads.
.RE
.sp


.TP 2m
\fB\-\-target\-pool\fR=[\fITARGET_POOL\fR,...]

Specifies any target pools you want the instances of this managed instance group
to be part of.

.TP 2m
\fB\-\-workload\-policy\fR=\fIWORKLOAD_POLICY\fR

Specifies the workload policy for the managed instance group. It can be a full
or partial URL to a resource policy containing the workload policy.

.TP 2m
\fB\-\-zones\fR=\fIZONE\fR,[\fIZONE\fR,...]

If this flag is specified a regional managed instance group will be created. The
managed instance group will be in the same region as specified zones and will
spread instances in it between specified zones.

All zones must belong to the same region. You may specify \-\-region flag but it
must be the region to which zones belong. This flag is mutually exclusive with
\-\-zone flag.

.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-health\-check\fR=\fIHEALTH_CHECK\fR

Name of the health check to operate on.

.TP 2m
\fB\-\-http\-health\-check\fR=\fIHTTP_HEALTH_CHECK\fR

(DEPRECATED) HTTP health check object used for autohealing instances in this
group.

HttpHealthCheck is deprecated. Use \-\-health\-check instead.

.TP 2m
\fB\-\-https\-health\-check\fR=\fIHTTPS_HEALTH_CHECK\fR

(DEPRECATED) HTTPS health check object used for autohealing instances in this
group.

HttpsHealthCheck is deprecated. Use \-\-health\-check instead.

.RE
.sp
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-region\fR=\fIREGION\fR

Region of the managed instance group to create. If not specified, you might be
prompted to select a region (interactive mode only).

A list of regions can be fetched by running:

.RS 2m
$ gcloud compute regions list
.RE


If you specify \f5\-\-zones\fR flag this flag must be unspecified or specify the
region to which the zones you listed belong.

Overrides the default \fBcompute/region\fR property value for this command
invocation.

.TP 2m
\fB\-\-zone\fR=\fIZONE\fR

Zone of the managed instance group to create. If not specified, you might be
prompted to select a zone (interactive mode only).

A list of zones can be fetched by running:

.RS 2m
$ gcloud compute zones list
.RE

Overrides the default \fBcompute/zone\fR property value for this command
invocation.

.RE
.sp
.TP 2m

Parameters for setting update policy for this managed instance group.


.RS 2m
.TP 2m
\fB\-\-update\-policy\-max\-surge\fR=\fIMAX_SURGE\fR

Maximum additional number of VMs that can be created during the update process.
This can be a fixed number (e.g. 5) or a percentage of size to the managed
instance group (e.g. 10%).

.TP 2m
\fB\-\-update\-policy\-max\-unavailable\fR=\fIMAX_UNAVAILABLE\fR

Maximum number of VMs that can be unavailable during the update process. This
can be a fixed number (e.g. 5) or a percentage of size to the managed instance
group (e.g. 10%). Defaults to the number of zones in which the managed instance
group operates.

.TP 2m
\fB\-\-update\-policy\-minimal\-action\fR=\fIUPDATE_POLICY_MINIMAL_ACTION\fR

Use this flag to minimize disruption as much as possible or to apply a more
disruptive action than is strictly necessary. The MIG performs at least this
action on each VM while updating. If the update requires a more disruptive
action than the one specified here, then the more disruptive action is
performed. \fIUPDATE_POLICY_MINIMAL_ACTION\fR must be one of:

.RS 2m
.TP 2m
\fBnone\fR
No action
.TP 2m
\fBrefresh\fR
Apply the new configuration without stopping VMs, if possible. For example, use
``refresh`` to apply changes that only affect metadata or additional disks.
.TP 2m
\fBrestart\fR
Apply the new configuration without replacing VMs, if possible. For example,
stopping VMs and starting them again is sufficient to apply changes to machine
type.
.TP 2m
\fBreplace\fR
Replace old VMs according to the \-\-update\-policy\-replacement\-method flag.
.RE
.sp


.TP 2m
\fB\-\-update\-policy\-most\-disruptive\-action\fR=\fIUPDATE_POLICY_MOST_DISRUPTIVE_ACTION\fR

Use this flag to prevent an update if it requires more disruption than you can
afford. At most, the MIG performs the specified action on each VM while
updating. If the update requires a more disruptive action than the one specified
here, then the update fails and no changes are made.
\fIUPDATE_POLICY_MOST_DISRUPTIVE_ACTION\fR must be one of:

.RS 2m
.TP 2m
\fBnone\fR
No action
.TP 2m
\fBrefresh\fR
Apply the new configuration without stopping VMs, if possible. For example, use
``refresh`` to apply changes that only affect metadata or additional disks.
.TP 2m
\fBrestart\fR
Apply the new configuration without replacing VMs, if possible. For example,
stopping VMs and starting them again is sufficient to apply changes to machine
type.
.TP 2m
\fBreplace\fR
Replace old VMs according to the \-\-update\-policy\-replacement\-method flag.
.RE
.sp


.TP 2m
\fB\-\-update\-policy\-replacement\-method\fR=\fIUPDATE_POLICY_REPLACEMENT_METHOD\fR

Type of replacement method. Specifies what action will be taken to update VMs.
\fIUPDATE_POLICY_REPLACEMENT_METHOD\fR must be one of:

.RS 2m
.TP 2m
\fBrecreate\fR
Recreate VMs and preserve the VM names. The VM IDs and creation timestamps might
change.
.TP 2m
\fBsubstitute\fR
Delete old VMs and create VMs with new names.
.RE
.sp


.TP 2m
\fB\-\-update\-policy\-type\fR=\fIUPDATE_TYPE\fR

Specifies the type of update process. You can specify either ``proactive`` so
that the managed instance group proactively executes actions in order to bring
VMs to their target versions or ``opportunistic`` so that no action is
proactively executed but the update will be performed as part of other actions.
\fIUPDATE_TYPE\fR must be one of:

.RS 2m
.TP 2m
\fBopportunistic\fR
Do not proactively replace VMs. Create new VMs and delete old ones on resizes of
the group and when you target specific VMs to be updated or recreated.
.TP 2m
\fBproactive\fR
Replace VMs proactively.
.RE
.sp



.RE
.RE
.sp

.SH "GCLOUD WIDE FLAGS"

These flags are available to all commands: \-\-access\-token\-file, \-\-account,
\-\-billing\-project, \-\-configuration, \-\-flags\-file, \-\-flatten,
\-\-format, \-\-help, \-\-impersonate\-service\-account, \-\-log\-http,
\-\-project, \-\-quiet, \-\-trace\-token, \-\-user\-output\-enabled,
\-\-verbosity.

Run \fB$ gcloud help\fR for details.



.SH "NOTES"

These variants are also available:

.RS 2m
$ gcloud alpha compute instance\-groups managed create
.RE

.RS 2m
$ gcloud beta compute instance\-groups managed create
.RE