# 

# exoscale_template (Data Source)

Fetch Exoscale [Compute Instance Templates](https://community.exoscale.com/product/compute/instances/how-to/custom-templates/) data.

Exoscale instance templates are regularly updated to include the latest updates. Whenever this happens, the template ID also changes which can lead terraform to plan the recreation of an instance. To work around this you may find [this issue](https://github.com/exoscale/terraform-provider-exoscale/issues/366) helpful.

## Example Usage

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

output "my_template_id" {
  value = data.exoscale_template.my_template.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 template ID to match (conflicts with `name`).
- `name` (String) The template name to match (conflicts with `id`) (when multiple templates have the same name, the newest one will be returned).
- `visibility` (String) A template category filter (default: `public`); among: - `public` - official Exoscale templates - `private` - custom templates private to my organization

### Read-Only

- `default_user` (String) Username to use to log into a compute instance based on this template



