# 

# exoscale_anti_affinity_group (Data Source)

Fetch Exoscale [Anti-Affinity Groups](https://community.exoscale.com/product/compute/instances/how-to/anti-affinity/) data.

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

## Example Usage

```terraform
data "exoscale_anti_affinity_group" "my_anti_affinity_group" {
  name = "my-anti-affinity-group"
}

output "my_anti_affinity_group_id" {
  value = data.exoscale_anti_affinity_group.my_anti_affinity_group.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

### Optional

- `id` (String) The anti-affinity group ID to match (conflicts with `name`).
- `name` (String) The group name to match (conflicts with `id`).

### Read-Only

- `instances` (Set of String) The list of attached [exoscale_compute_instance]({{< ref "../resources/compute_instance.md" >}}) (IDs).



