# ionoscloud\_template

The **Template data source** can be used to search for and return existing templates by providing any of template properties (name, cores, ram, storage\_size). If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search string so that it is specific enough to return only one result.

## Example Usage

### By Name

```hcl
data "ionoscloud_template" "example" {
	name = "CUBES S"
}
```

### By Cores

```hcl
data "ionoscloud_template" "example" {
	cores = 6
}
```

### By Ram

```hcl
data "ionoscloud_template" "example" {
	ram = 49152
}
```

### By Storage Size

```hcl
data "ionoscloud_template" "example" {
	storage_size = 80
}
```

## Argument Reference

* `name` - (Optional) A name of that resource.
* `cores` - (Optional) The CPU cores count.
* `ram` - (Optional) The RAM size in MB.
* `storage_size` - (Optional) The storage size in GB.
* `category` - (Optional) The category of the template.

Any of the arguments ca be provided. If none, the datasource will return an error.

## Attributes Reference

The following attributes are returned by the datasource:

* `id` - Id of template
* `name` - Name of template
* `cores`- The CPU cores count
* `ram` - The RAM size in MB
* `storage_size` - The storage size in GB
* `category` - The category of the template
* `gpus` - List of GPUs in the template
  * `count` - The number of GPUs
  * `model` - The model of the GPU
  * `type` - The type of the GPU
  * `vendor` - The vendor of the GPU


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionos.com/terraform-provider/data-sources/template.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
