Skip to content

Commit

Permalink
Updating docs with IGM deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisst committed Oct 28, 2019
1 parent 87653c9 commit 457daa8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,6 @@ resource "google_compute_instance_group_manager" "igm-instance-template-upgrade"
name = "%s"

version {
name = "primary"
instance_template = "${google_compute_instance_template.igm-instance-template-upgrade.self_link}"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ resource "google_compute_instance_group_manager" "appserver" {
name = "appserver-igm"
base_instance_name = "app"
instance_template = "${google_compute_instance_template.appserver.self_link}"
update_strategy = "NONE"
zone = "us-central1-a"
version {
instance_template = "${google_compute_instance_template.appserver.self_link}"
}
target_pools = ["${google_compute_target_pool.appserver.self_link}"]
target_size = 2
Expand Down Expand Up @@ -91,11 +93,12 @@ The following arguments are supported:
appending a hyphen and a random four-character string to the base instance
name.

* `instance_template` - (Required, [GA](https://terraform.io/docs/providers/google/provider_versions.html)) The
* `instance_template` - (Deprecated) The
full URL to an instance template from which all new instances
will be created. This field is only present in the `google` provider.
will be created. This field is replaced by `version.instance_template`. You must
specify at least one `version` block with an `instance_template`.

* `version` - (Required, [Beta](https://terraform.io/docs/providers/google/provider_versions.html)) Application versions managed by this instance group. Each
* `version` - (Optional) Application versions managed by this instance group. Each
version deals with a specific instance template, allowing canary release scenarios.
Structure is documented below.

Expand All @@ -118,11 +121,8 @@ The following arguments are supported:
* `project` - (Optional) The ID of the project in which the resource belongs. If it
is not provided, the provider project is used.

* `update_strategy` - (Optional, Default `"REPLACE"`) If the `instance_template`
resource is modified, a value of `"NONE"` will prevent any of the managed
instances from being restarted by Terraform. A value of `"REPLACE"` will
restart all of the instances at once. This field is only present in the
`google` provider.
* `update_strategy` - (Deprecated) This field has been deprecated, use `update_policy`
instead.

* `target_size` - (Optional) The target number of running instances for this managed
instance group. This value should always be explicitly set unless this resource is attached to
Expand All @@ -138,10 +138,10 @@ The following arguments are supported:

---

* `auto_healing_policies` - (Optional, [Beta](https://terraform.io/docs/providers/google/provider_versions.html)) The autohealing policies for this managed instance
* `auto_healing_policies` - (Optional) The autohealing policies for this managed instance
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).

* `update_policy` - (Optional, [Beta](https://terraform.io/docs/providers/google/provider_versions.html)) 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)
* `update_policy` - (Optional) 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)
- - -

The `update_policy` block supports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ resource "google_compute_region_instance_group_manager" "appserver" {
name = "appserver-igm"
base_instance_name = "app"
instance_template = "${google_compute_instance_template.appserver.self_link}"
version {
instance_template = "${google_compute_instance_template.appserver.self_link}"
}
region = "us-central1"
distribution_policy_zones = ["us-central1-a", "us-central1-f"]
Expand All @@ -55,13 +58,12 @@ resource "google_compute_region_instance_group_manager" "appserver" {
```

## Example Usage with multiple versions (`google-beta` provider)
## Example Usage with multiple versions
```hcl
resource "google_compute_region_instance_group_manager" "appserver" {
name = "appserver-igm"
base_instance_name = "app"
update_strategy = "NONE"
region = "us-central1"
target_size = 5
Expand Down Expand Up @@ -90,11 +92,12 @@ The following arguments are supported:
appending a hyphen and a random four-character string to the base instance
name.

* `instance_template` - (Required, [GA](https://terraform.io/docs/providers/google/provider_versions.html)) The full URL to an instance template from
which all new instances will be created. This field is only present in the
`google` provider.
* `instance_template` - (Deprecated) The
full URL to an instance template from which all new instances
will be created. This field is replaced by `version.instance_template`. You must
specify at least one `version` block with an `instance_template`.

* `version` - (Required, [Beta](https://terraform.io/docs/providers/google/provider_versions.html)) Application versions managed by this instance group. Each
* `version` - (Optional) Application versions managed by this instance group. Each
version deals with a specific instance template, allowing canary release scenarios.
Structure is documented below.

Expand Down Expand Up @@ -130,11 +133,11 @@ The following arguments are supported:

---

* `auto_healing_policies` - (Optional, [Beta](https://terraform.io/docs/providers/google/provider_versions.html)) The autohealing policies for this managed instance
* `auto_healing_policies` - (Optional) The autohealing policies for this managed instance
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).


* `update_policy` - (Optional, [Beta](https://terraform.io/docs/providers/google/provider_versions.html)) 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/regionInstanceGroupManagers/patch)
* `update_policy` - (Optional) 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/regionInstanceGroupManagers/patch)


* `distribution_policy_zones` - (Optional) The distribution policy for this managed instance
Expand Down

0 comments on commit 457daa8

Please sign in to comment.