2017-08-11 17:17:36 +00:00
|
|
|
---
|
|
|
|
layout: "google"
|
|
|
|
page_title: "Google: google_compute_instance_group"
|
|
|
|
sidebar_current: "docs-google-datasource-compute-instance-group"
|
|
|
|
description: |-
|
|
|
|
Get a Compute Instance Group within GCE.
|
|
|
|
---
|
|
|
|
|
|
|
|
# google\_compute\_instance\_group
|
|
|
|
|
|
|
|
Get a Compute Instance Group within GCE.
|
|
|
|
For more information, see [the official documentation](https://cloud.google.com/compute/docs/instance-groups/#unmanaged_instance_groups)
|
|
|
|
and [API](https://cloud.google.com/compute/docs/reference/latest/instanceGroups)
|
|
|
|
|
|
|
|
```
|
|
|
|
data "google_compute_instance_group" "all" {
|
|
|
|
name = "instance-group-name"
|
|
|
|
zone = "us-central1-a"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
|
|
|
* `name` - (Required) The name of the instance group.
|
|
|
|
|
|
|
|
* `zone` - (Required) The zone of the instance group.
|
|
|
|
|
|
|
|
- - -
|
|
|
|
|
2018-03-12 20:59:47 +00:00
|
|
|
* `project` - (Optional) The ID of the project in which the resource belongs. If it
|
2017-08-11 17:17:36 +00:00
|
|
|
is not provided, the provider project is used.
|
|
|
|
|
|
|
|
## Attributes Reference
|
|
|
|
|
|
|
|
The following arguments are exported:
|
|
|
|
|
|
|
|
* `description` - Textual description of the instance group.
|
|
|
|
|
|
|
|
* `instances` - List of instances in the group.
|
|
|
|
|
2018-03-12 20:59:47 +00:00
|
|
|
* `named_port` - List of named ports in the group.
|
2017-08-11 17:17:36 +00:00
|
|
|
|
|
|
|
* `network` - The URL of the network the instance group is in.
|
|
|
|
|
|
|
|
* `self_link` - The URI of the resource.
|
|
|
|
|
|
|
|
* `size` - The number of instances in the group.
|