diff --git a/build/terraform b/build/terraform index ee0f7e49dd6b..094a2f6bfb07 160000 --- a/build/terraform +++ b/build/terraform @@ -1 +1 @@ -Subproject commit ee0f7e49dd6be2806377998ba4263571a7ecf94d +Subproject commit 094a2f6bfb07639af5cb1718eb39f251e90cdb8f diff --git a/build/terraform-beta b/build/terraform-beta index 5e087229861b..02bc9887c90b 160000 --- a/build/terraform-beta +++ b/build/terraform-beta @@ -1 +1 @@ -Subproject commit 5e087229861bbec45b0d6c5b22a1468049d167ae +Subproject commit 02bc9887c90bafea3285d0a22aa18b164d6cd234 diff --git a/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown b/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown index 6bb22b05db0f..1116bd63556b 100644 --- a/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown +++ b/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown @@ -641,11 +641,45 @@ resource "google_compute_instance_group_manager" "my_igm" { ### `update_strategy` has been replaced by `update_policy` To allow much greater control over the updates happening to instance groups -`update_strategy` has been replaced by `update_policy`. The previous -functionality to determine if instance should be replaced or restarted can be -achieved using `update_policy.minimal_action`. For more details see the +`update_strategy` has been replaced by `update_policy`. The functionality controlled by `update_strategy` is now controlled by a combination of `update_policy.type` and `update_policy.minimal_action`. `update_strategy = NONE` can be achieved with `type = OPPORTUNISTIC`. The previous values of `RESTART` and `REPLACE` were both `PROACTIVE` types implicitly previously but can now be controlled explicitly. + +For more details see the [official guide](https://cloud.google.com/compute/docs/instance-groups/rolling-out-updates-to-managed-instance-groups). +### Old Config + +```hcl +resource "google_compute_instance_group_manager" "my_igm" { + name = "my-igm" + zone = "us-central1-c" + base_instance_name = "igm" + + instance_template = "${google_compute_instance_template.my_tmpl.self_link}" + + update_strategy = "NONE" +} +``` + +### New Config + +```hcl +resource "google_compute_instance_group_manager" "my_igm" { + name = "my-igm" + zone = "us-central1-c" + base_instance_name = "igm" + + version { + name = "prod" + instance_template = "${google_compute_instance_template.my_tmpl.self_link}" + } + + update_policy { + minimal_action = "RESTART" + type = "OPPORTUNISTIC" + } +} +``` + ## Resource: `google_compute_instance_template` ### At least one of `enable_secure_boot`, `enable_vtpm`, or `enable_integrity_monitoring` is now required on `google_compute_instance_template.shielded_instance_config` diff --git a/third_party/terraform/website/docs/r/compute_instance_group_manager.html.markdown b/third_party/terraform/website/docs/r/compute_instance_group_manager.html.markdown index 4107bf091199..a3c6b3b51226 100644 --- a/third_party/terraform/website/docs/r/compute_instance_group_manager.html.markdown +++ b/third_party/terraform/website/docs/r/compute_instance_group_manager.html.markdown @@ -149,9 +149,9 @@ update_policy { } ``` -* `minimal_action` - (Required) - Minimal action to be taken on an instance. Valid values are `"RESTART"`, `"REPLACE"` +* `minimal_action` - (Required) - Minimal action to be taken on an instance. You can specify either `RESTART` to restart existing instances or `REPLACE` to delete and create new instances from the target template. If you specify a `RESTART`, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action. -* `type` - (Required) - The type of update. Valid values are `"OPPORTUNISTIC"`, `"PROACTIVE"` +* `type` - (Required) - The type of update process. You can specify either `PROACTIVE` so that the instance group manager proactively executes actions in order to bring instances to their target versions or `OPPORTUNISTIC` so that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls). * `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 diff --git a/third_party/terraform/website/docs/r/compute_region_instance_group_manager.html.markdown b/third_party/terraform/website/docs/r/compute_region_instance_group_manager.html.markdown index 6ab67dcc8571..bdf7a4634f1c 100644 --- a/third_party/terraform/website/docs/r/compute_region_instance_group_manager.html.markdown +++ b/third_party/terraform/website/docs/r/compute_region_instance_group_manager.html.markdown @@ -152,9 +152,9 @@ update_policy { } ``` -* `minimal_action` - (Required) - Minimal action to be taken on an instance. Valid values are `"RESTART"`, `"REPLACE"` +* `minimal_action` - (Required) - Minimal action to be taken on an instance. You can specify either `RESTART` to restart existing instances or `REPLACE` to delete and create new instances from the target template. If you specify a `RESTART`, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action. -* `type` - (Required) - The type of update. Valid values are `"OPPORTUNISTIC"`, `"PROACTIVE"` +* `type` - (Required) - The type of update process. You can specify either `PROACTIVE` so that the instance group manager proactively executes actions in order to bring instances to their target versions or `OPPORTUNISTIC` so that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls). * `instance_redistribution_type` - (Optional) - The instance redistribution policy for regional managed instance groups. Valid values are: `"PROACTIVE"`, `"NONE"`. If `PROACTIVE` (default), the group attempts to maintain an even distribution of VM instances across zones in the region. If `NONE`, proactive redistribution is disabled.