github.com/leeprovoost/terraform@v0.6.10-0.20160119085442-96f3f76118e7/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  ```
    30  
    31  ## Argument Reference
    32  
    33  The following arguments are supported:
    34  
    35  * `base_instance_name` - (Required) The base instance name to use for
    36  instances in this group. The value must be a valid [RFC1035](https://www.ietf.org/rfc/rfc1035.txt) name.
    37  Supported characters are lowercase letters, numbers, and hyphens (-). Instances
    38  are named by appending a hyphen and a random four-character string to the base
    39  instance name.
    40  
    41  * `description` - (Optional) An optional textual description of the instance
    42  group manager.
    43  
    44  * `instance_template` - (Required) The full URL to an instance template from
    45  which all new instances will be created. 
    46  
    47  * `update_strategy` - (Optional, Default `"RESTART"`) If the `instance_template` resource is
    48  modified, a value of `"NONE"` will prevent any of the managed instances from
    49  being restarted by Terraform. A value of `"RESTART"` will restart all of the 
    50  instances at once. In the future, as the GCE API matures we will support
    51  `"ROLLING_UPDATE"` as well.
    52  
    53  * `name` - (Required) The name of the instance group manager. Must be 1-63
    54  characters long and comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
    55  Supported characters include lowercase letters, numbers, and hyphens.
    56  
    57  * `target_size` - (Optional) If not given at creation time, this defaults to 1.  Do not specify this
    58    if you are managing the group with an autoscaler, as this will cause fighting.
    59  
    60  * `target_pools` - (Optional) The full URL of all target pools to which new
    61  instances in the group are added. Updating the target pools attribute does not
    62  affect existing instances.
    63  
    64  * `zone` - (Required) The zone that instances in this group should be created in.
    65  
    66  ## Attributes Reference
    67  
    68  The following attributes are exported:
    69  
    70  * `instance_group` - The full URL of the instance group created by the manager.
    71  
    72  * `self_link` - The URL of the created resource.