# 

# exoscale_compute_instance_list (Data Source)

List Exoscale [Compute Instances](https://community.exoscale.com/documentation/compute/).

Corresponding resource: [exoscale_compute_instance]({{< ref "../resources/compute_instance.md" >}}).

## Example Usage

```terraform
data "exoscale_compute_instance_list" "my_compute_instance_list" {
  zone = "ch-gva-2"

  type = "standard.micro"

  name = "/.*ubuntu.*/"

  labels = {
    "customer" = "/.*bank.*/"
    "contract" = "premium-support"
  }
}

output "my_compute_instance_ids" {
  value = join("\n", formatlist(
    "%s", data.exoscale_compute_instance_list.my_compute_instance_list.instances.*.id
  ))
}
```

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

- `zone` (String) The Exoscale [Zone](https://www.exoscale.com/datacenters/) name.

### Optional

- `created_at` (String) Match against this string. If you supply a string that begins and ends with a "/" it will be matched as a regex.
- `deploy_target_id` (String) Match against this string. If you supply a string that begins and ends with a "/" it will be matched as a regex.
- `disk_size` (Number) Match against this int
- `enable_secure_boot` (Boolean) Match against this bool
- `enable_tpm` (Boolean) Match against this bool
- `id` (String) Match against this string. If you supply a string that begins and ends with a "/" it will be matched as a regex.
- `ipv6` (Boolean) Match against this bool
- `ipv6_address` (String) Match against this string. If you supply a string that begins and ends with a "/" it will be matched as a regex.
- `labels` (Map of String) Match against key/values. Keys are matched exactly, while values may be matched as a regex if you supply a string that begins and ends with "/"
- `manager_id` (String) Match against this string. If you supply a string that begins and ends with a "/" it will be matched as a regex.
- `manager_type` (String) Match against this string. If you supply a string that begins and ends with a "/" it will be matched as a regex.
- `name` (String) Match against this string. If you supply a string that begins and ends with a "/" it will be matched as a regex.
- `public_ip_address` (String) Match against this string. If you supply a string that begins and ends with a "/" it will be matched as a regex.
- `reverse_dns` (String) Match against this string. If you supply a string that begins and ends with a "/" it will be matched as a regex.
- `ssh_key` (String) Match against this string. If you supply a string that begins and ends with a "/" it will be matched as a regex.
- `state` (String) Match against this string. If you supply a string that begins and ends with a "/" it will be matched as a regex.
- `template_id` (String) Match against this string. If you supply a string that begins and ends with a "/" it will be matched as a regex.
- `type` (String) Match against this string. If you supply a string that begins and ends with a "/" it will be matched as a regex.
- `user_data` (String) Match against this string. If you supply a string that begins and ends with a "/" it will be matched as a regex.

### Read-Only

- `instances` (List of Object) The list of [exoscale_compute_instance]({{< ref "./compute_instance.md" >}}). (see [below for nested schema](#nestedatt--instances))

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

Read-Only:

- `anti_affinity_group_ids` (Set of String)
- `created_at` (String)
- `deploy_target_id` (String)
- `disk_size` (Number)
- `elastic_ip_ids` (Set of String)
- `enable_secure_boot` (Boolean)
- `enable_tpm` (Boolean)
- `id` (String)
- `ipv6` (Boolean)
- `ipv6_address` (String)
- `labels` (Map of String)
- `manager_id` (String)
- `manager_type` (String)
- `name` (String)
- `private_network_ids` (Set of String)
- `public_ip_address` (String)
- `reverse_dns` (String)
- `security_group_ids` (Set of String)
- `ssh_key` (String)
- `ssh_keys` (Set of String)
- `state` (String)
- `template_id` (String)
- `type` (String)
- `user_data` (String)
- `zone` (String)



