# 

# exoscale_compute_instance (Data Source)

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

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

## Example Usage

```terraform
data "exoscale_compute_instance" "my_instance" {
  zone = "ch-gva-2"
  name = "my-instance"
}

output "my_instance_id" {
  value = data.exoscale_compute_instance.my_instance.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

- `id` (String) The compute instance ID to match (conflicts with `name`).
- `name` (String) The instance name to match (conflicts with `id`).

### Read-Only

- `anti_affinity_group_ids` (Set of String) The list of attached [exoscale_anti_affinity_group]({{< ref "../resources/anti_affinity_group.md" >}}) (IDs).
- `created_at` (String) The compute instance creation date.
- `deploy_target_id` (String) A deploy target ID.
- `disk_size` (Number) The instance disk size (GiB).
- `elastic_ip_ids` (Set of String) The list of attached [exoscale_elastic_ip]({{< ref "../resources/elastic_ip.md" >}}) (IDs).
- `enable_secure_boot` (Boolean) Indicates if the instance has secure boot enabled.
- `enable_tpm` (Boolean) Indicates if the instance has TPM enabled.
- `ipv6` (Boolean) Whether IPv6 is enabled on the instance.
- `ipv6_address` (String) The instance (main network interface) IPv6 address (if enabled).
- `labels` (Map of String) A map of key/value labels.
- `manager_id` (String) The instance manager ID, if any.
- `manager_type` (String) The instance manager type (instance pool, SKS node pool, etc.), if any.
- `private_network_ids` (Set of String) The list of attached [exoscale_private_network]({{< ref "../resources/private_network.md" >}}) (IDs).
- `public_ip_address` (String) The instance (main network interface) IPv4 address.
- `reverse_dns` (String) Domain name for reverse DNS record.
- `security_group_ids` (Set of String) The list of attached [exoscale_security_group]({{< ref "../resources/security_group.md" >}}) (IDs).
- `ssh_key` (String, Deprecated) The [exoscale_ssh_key]({{< ref "../resources/ssh_key.md" >}}) (name) authorized on the instance.
- `ssh_keys` (Set of String) The list of [exoscale_ssh_key]({{< ref "../resources/ssh_key.md" >}}) (name) authorized on the instance.
- `state` (String) The instance state.
- `template_id` (String) The instance [exoscale_template]({{< ref "./template.md" >}}) ID.
- `type` (String) The instance type.
- `user_data` (String) The instance [cloud-init](http://cloudinit.readthedocs.io/en/latest/) configuration.



