github.com/erriapo/terraform@v0.6.12-0.20160203182612-0340ea72354f/website/source/docs/providers/google/r/compute_instance_group_manager.html.markdown (about) 1 --- 2 layout: "google" 3 page_title: "Google: google_compute_instance_group_manager" 4 sidebar_current: "docs-google-compute-instance-group-manager" 5 description: |- 6 Manages an Instance Group within GCE. 7 --- 8 9 # google\_compute\_instance\_group\_manager 10 11 The Google Compute Engine Instance Group Manager API creates and manages pools 12 of homogeneous Compute Engine virtual machine instances from a common instance 13 template. For more information, see [the official documentation](https://cloud.google.com/compute/docs/instance-groups/manager 14 and [API](https://cloud.google.com/compute/docs/instance-groups/manager/v1beta2/instanceGroupManagers) 15 16 ## Example Usage 17 18 ``` 19 resource "google_compute_instance_group_manager" "foobar" { 20 description = "Terraform test instance group manager" 21 name = "terraform-test" 22 instance_template = "${google_compute_instance_template.foobar.self_link}" 23 update_strategy= "NONE" 24 target_pools = ["${google_compute_target_pool.foobar.self_link}"] 25 base_instance_name = "foobar" 26 zone = "us-central1-a" 27 target_size = 2 28 29 named_port { 30 name = "customHTTP" 31 port = 8888 32 } 33 34 } 35 ``` 36 37 ## Argument Reference 38 39 The following arguments are supported: 40 41 * `base_instance_name` - (Required) The base instance name to use for 42 instances in this group. The value must be a valid [RFC1035](https://www.ietf.org/rfc/rfc1035.txt) name. 43 Supported characters are lowercase letters, numbers, and hyphens (-). Instances 44 are named by appending a hyphen and a random four-character string to the base 45 instance name. 46 47 * `description` - (Optional) An optional textual description of the instance 48 group manager. 49 50 * `instance_template` - (Required) The full URL to an instance template from 51 which all new instances will be created. 52 53 * `update_strategy` - (Optional, Default `"RESTART"`) If the `instance_template` resource is 54 modified, a value of `"NONE"` will prevent any of the managed instances from 55 being restarted by Terraform. A value of `"RESTART"` will restart all of the 56 instances at once. In the future, as the GCE API matures we will support 57 `"ROLLING_UPDATE"` as well. 58 59 * `name` - (Required) The name of the instance group manager. Must be 1-63 60 characters long and comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). 61 Supported characters include lowercase letters, numbers, and hyphens. 62 63 * `target_size` - (Optional) If not given at creation time, this defaults to 1. Do not specify this 64 if you are managing the group with an autoscaler, as this will cause fighting. 65 66 * `target_pools` - (Optional) The full URL of all target pools to which new 67 instances in the group are added. Updating the target pools attribute does not 68 affect existing instances. 69 70 * `zone` - (Required) The zone that instances in this group should be created in. 71 72 The `named_port` block supports: (Include a named_port block for each named-port required). 73 74 * `name` - (Required) The name of the port. 75 76 * `port` - (Required) The port number. 77 78 ## Attributes Reference 79 80 The following attributes are exported: 81 82 * `instance_group` - The full URL of the instance group created by the manager. 83 84 * `self_link` - The URL of the created resource.