# ionoscloud\_snapshot

The **Snapshot data source** can be used to search for and return an existing snapshot which can then be used to provision a server. 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 ID

```hcl
data "ionoscloud_snapshot" "example" {
  id = "snapshot_id"
}
```

### By Name & Size & Location

```hcl
data "ionoscloud_snapshot" "example" {
  name     = "Snapshot Example"
  size     = "2"
  location = "us/las"
}
```

Note: The size argument is in GB

## Argument Reference

* `id` - (Optional) UUID of an existing snapshot that you want to search for.
* `name` - (Optional) Name of an existing snapshot that you want to search for.
* `location` - (Optional) Existing snapshot's location.
* `size` - (Optional) The size of the snapshot to look for.

Either `name` or `id` must be provided. If none, or both are provided, the datasource will return an error. Additionally, you can add `location` and `size` along with the `name` argument for a more refined search. 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.

## Attributes Reference

The following attributes are returned by the datasource:

* `id` - UUID of the snapshot
* `name` - The name of the snapshot.
* `description` - Human readable description
* `licence_type` - OS type of this Snapshot
* `location` - Location of that image/snapshot
* `size` - The size of the image in GB
* `sec_auth_protection` - Boolean value representing if the snapshot requires extra protection e.g. two factor protection
* `cpu_hot_plug` - Is capable of CPU hot plug (no reboot required)
* `cpu_hot_unplug` - Is capable of CPU hot unplug (no reboot required)
* `ram_hot_plug` - Is capable of memory hot plug (no reboot required)
* `ram_hot_unplug` - Is capable of memory hot unplug (no reboot required)
* `nic_hot_plug` - Is capable of nic hot plug (no reboot required)
* `nic_hot_unplug` - Is capable of nic hot unplug (no reboot required)
* `disc_virtio_hot_plug` - Is capable of Virt-IO drive hot plug (no reboot required)
* `disc_virtio_hot_unplug` - Is capable of Virt-IO drive hot unplug (no reboot required). This works only for non-Windows virtual Machines.
* `disc_scsi_hot_plug` - Is capable of SCSI drive hot plug (no reboot required)
* `disc_scsi_hot_unplug` - Is capable of SCSI drive hot unplug (no reboot required). This works only for non-Windows virtual Machines.
* `require_legacy_bios` - Indicates if the image requires the legacy BIOS for compatibility or specific needs.


---

# 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/snapshot.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.
