# 

# exoscale_instance_pool (Resource)

Manage Exoscale [Instance Pools](https://community.exoscale.com/product/compute/instances/how-to/instance-pools/).

Corresponding data sources: [exoscale_instance_pool](../data-sources/instance_pool.md), [exoscale_instance_pool_list]({{< ref "../data-sources/instance_pool_list.md" >}}).

## Example Usage

```terraform
data "exoscale_template" "my_template" {
  zone = "ch-gva-2"
  name = "Linux Ubuntu 22.04 LTS 64-bit"
}

resource "exoscale_instance_pool" "my_instance_pool" {
  zone = "ch-gva-2"
  name = "my-instance-pool"

  template_id   = data.exoscale_template.my_template.id
  instance_type = "standard.medium"
  disk_size     = 10
  size          = 3
}
```

Please refer to the [examples](https://github.com/exoscale/terraform-provider-exoscale/tree/master/examples/)
directory for complete configuration examples.

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `name` (String) The instance pool name.
- `size` (Number) The number of managed instances.
- `template_id` (String) The [exoscale_template]({{< ref "../data-sources/template.md" >}}) (ID) to use when creating the managed instances.
- `zone` (String) ❗ The Exoscale [Zone](https://www.exoscale.com/datacenters/) name.

### Optional

- `affinity_group_ids` (Set of String, Deprecated) A list of [exoscale_anti_affinity_group]({{< ref "./anti_affinity_group.md" >}}) (IDs; may only be set at creation time).
- `anti_affinity_group_ids` (Set of String) A list of [exoscale_anti_affinity_group]({{< ref "./anti_affinity_group.md" >}}) (IDs; may only be set at creation time).
- `deploy_target_id` (String) A deploy target ID.
- `description` (String) A free-form text describing the pool.
- `disk_size` (Number) The managed instances disk size (GiB).
- `elastic_ip_ids` (Set of String) A list of [exoscale_elastic_ip]({{< ref "./elastic_ip.md" >}}) (IDs).
- `instance_prefix` (String) The string used to prefix managed instances name (default: `pool`).
- `instance_type` (String) The managed compute instances type (`<family>.<size>`, e.g. `standard.medium`; use the [Exoscale CLI](https://github.com/exoscale/cli/) - `exo compute instance-type list` - for the list of available types).
- `instances` (Block Set) The list of managed instances. Structure is documented below. (see [below for nested schema](#nestedblock--instances))
- `ipv6` (Boolean) Enable IPv6 on managed instances (boolean; default: `false`).
- `key_pair` (String) The [exoscale_ssh_key]({{< ref "./ssh_key.md" >}}) (name) to authorize in the managed instances.
- `labels` (Map of String) A map of key/value labels.
- `min_available` (Number) Minimum number of running Instances.
- `network_ids` (Set of String) A list of [exoscale_private_network]({{< ref "./private_network.md" >}}) (IDs).
- `security_group_ids` (Set of String) A list of [exoscale_security_group]({{< ref "./security_group.md" >}}) (IDs).
- `service_offering` (String, Deprecated) The managed instances type. Please use the `instance_type` argument instead.
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
- `user_data` (String) [cloud-init](http://cloudinit.readthedocs.io/) configuration to apply to the managed instances.
- `virtual_machines` (Set of String, Deprecated) The list of managed instances (IDs). Please use the `instances.*.id` attribute instead.

### Read-Only

- `id` (String) The ID of this resource.
- `state` (String)

<a id="nestedblock--instances"></a>
### Nested Schema for `instances`

Optional:

- `name` (String) The instance name.

Read-Only:

- `id` (String) The ID of this resource.
- `ipv6_address` (String) The instance (main network interface) IPv6 address.
- `public_ip_address` (String) The instance (main network interface) IPv4 address.


<a id="nestedblock--timeouts"></a>
### Nested Schema for `timeouts`

Optional:

- `create` (String)
- `delete` (String)
- `read` (String)
- `update` (String)

-> The symbol ❗ in an attribute indicates that modifying it, will force the creation of a new resource.

## Import

```shell
# An existing instance pool may be imported by `<ID>@<zone>`:

terraform import \
  exoscale_instance_pool.my_instance_pool \
  f81d4fae-7dec-11d0-a765-00a0c91e6bf6@ch-gva-2
```

