Skip to content

Commit 7169725

Browse files
ishashchuknat-henderson
authored andcommitted
Rolling update support for instance group manager (hashicorp#1137)
1 parent c6e948e commit 7169725

File tree

1 file changed

+34
-4
lines changed

1 file changed

+34
-4
lines changed

docs/r/compute_instance_group_manager.html.markdown

+34-4
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ The following arguments are supported:
9090
* `update_strategy` - (Optional, Default `"RESTART"`) If the `instance_template`
9191
resource is modified, a value of `"NONE"` will prevent any of the managed
9292
instances from being restarted by Terraform. A value of `"RESTART"` will
93-
restart all of the instances at once. In the future, as the GCE API matures
94-
we will support `"ROLLING_UPDATE"` as well.
93+
restart all of the instances at once. `"ROLLING_UPDATE"` is supported as [Beta feature].
94+
A value of `"ROLLING_UPDATE"` requires `rolling_update_policy` block to be set
9595

9696
* `target_size` - (Optional) The target number of running instances for this managed
9797
instance group. This value should always be explicitly set unless this resource is attached to
@@ -106,13 +106,43 @@ The following arguments are supported:
106106
* `auto_healing_policies` - (Optional, [Beta](/docs/providers/google/index.html#beta-features)) The autohealing policies for this managed instance
107107
group. You can specify only one value. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances#monitoring_groups).
108108

109-
The `named_port` block supports: (Include a `named_port` block for each named-port required).
109+
* `rolling_update_policy` - (Optional, [Beta](/docs/providers/google/index.html#beta-features)) The update policy for this managed instance group. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/updating-managed-instance-groups) and [API](https://cloud.google.com/compute/docs/reference/rest/beta/instanceGroupManagers/patch)
110+
111+
The **rolling_update_policy** block supports:
112+
113+
```hcl
114+
rolling_update_policy{
115+
type = "PROACTIVE"
116+
minimal_action = "REPLACE"
117+
max_surge_percent = 20
118+
max_unavailable_fixed = 2
119+
min_ready_sec = 50
120+
}
121+
```
122+
123+
* `minimal_action` - (Required) - Minimal action to be taken on an instance. Valid values are `"RESTART"`, `"REPLACE"`
124+
125+
* `type` - (Required) - The type of update. Valid values are `"OPPORTUNISTIC"`, `"PROACTIVE"`
126+
127+
* `max_surge_fixed` - (Optional), The maximum number of instances that can be created above the specified targetSize during the update process. Conflicts with `max_surge_percent`. If neither is set, defaults to 1
128+
129+
* `max_surge_percent` - (Optional), The maximum number of instances(calculated as percentage) that can be created above the specified targetSize during the update process. Conflicts with `max_surge_fixed`.
130+
131+
* `max_unavailable_fixed` - (Optional), The maximum number of instances that can be unavailable during the update process. Conflicts with `max_unavailable_percent`. If neither is set, defaults to 1
132+
133+
* `max_unavailable_percent` - (Optional), The maximum number of instances(calculated as percentage) that can be unavailable during the update process. Conflicts with `max_unavailable_fixed`.
134+
135+
* `min_ready_sec` - (Optional), Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600]
136+
- - -
137+
138+
The **named_port** block supports: (Include a `named_port` block for each named-port required).
110139

111140
* `name` - (Required) The name of the port.
112141

113142
* `port` - (Required) The port number.
143+
- - -
114144

115-
The `auto_healing_policies` block supports:
145+
The **auto_healing_policies** block supports:
116146

117147
* `health_check` - (Required) The health check resource that signals autohealing.
118148

0 commit comments

Comments
 (0)