> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/tools-terraform/docs/resources/snapshot.md).

# ionoscloud\_snapshot

Creates and manages snapshot objects.

Manages [Snapshots](https://docs.ionos.com/cloud/storage-and-backup/images-snapshots/snapshots) on IONOS CLOUD.

## Example Usage

```hcl
data "ionoscloud_image" "example" {
    type                  = "HDD"
    image_alias           = "ubuntu:latest"
    location              = "us/las"
}

resource "ionoscloud_datacenter" "example" {
    name                  = "Datacenter Example"
    location              = "us/las"
    description           = "Datacenter Description"
    sec_auth_protection   = false
}

resource "ionoscloud_lan" "example" {
    datacenter_id         = ionoscloud_datacenter.example.id
    public                = true
    name                  = "Lan Example"
}

resource "ionoscloud_server" "example" {
    name                  = "Server Example"
    datacenter_id         = ionoscloud_datacenter.example.id
    cores                 = 1
    ram                   = 1024
    image_name            = data.ionoscloud_image.example.id
    image_password        = random_password.server_image_password.result
    type                  = "ENTERPRISE"
    volume {
        name              = "system"
        size              = 5
        disk_type         = "SSD Standard"
        user_data         = "foo"
        bus               = "VIRTIO"
        availability_zone = "ZONE_1"
    }
}

resource "ionoscloud_snapshot" "test_snapshot" {
  datacenter_id = ionoscloud_datacenter.example.id
  volume_id     = ionoscloud_server.example.boot_volume
  name          = "Snapshot Example"
}

resource "random_password" "server_image_password" {
  length           = 16
  special          = false
}
```

## Argument reference

* `datacenter_id` - (Required)\[string] The ID of the Virtual Data Center.
* `name` - (Required)\[string] The name of the snapshot.
* `volume_id` - (Required)\[string] The ID of the specific volume to take the snapshot from.
* `description` - (Optional)(Computed)\[string] Human readable description
* `licence_type` - (Optional)(Computed)\[string] OS type of this Snapshot
* `cpu_hot_plug` - (Optional)(Computed)\[string] Is capable of CPU hot plug (no reboot required). Can only be updated.
* `ram_hot_plug` - (Optional)(Computed)\[string] Is capable of memory hot plug (no reboot required). Can only be updated.
* `disc_virtio_hot_plug` - (Optional)(Computed)\[string] Is capable of Virt-IO drive hot plug (no reboot required). Can only be updated.
* `disc_virtio_hot_unplug` - (Optional)(Computed)\[string] Is capable of Virt-IO drive hot unplug (no reboot required). This works only for non-Windows virtual Machines. Can only be updated.
* `nic_hot_plug` - (Optional)(Computed)\[string] Is capable of nic hot plug (no reboot required). Can only be updated.
* `nic_hot_unplug` - (Optional)(Computed)\[string] Is capable of nic hot unplug (no reboot required). Can only be updated.
* `require_legacy_bios` - (Optional)(Computed)\[boolean] Indicates if the image requires the legacy BIOS for compatibility or specific needs. During creation, if an image is used, the value will be inherited from the image, regardless of the value set in the plan. Later on, the value can be updated.

## Attribute reference

Beside the configurable arguments, the resource returns the following additional attributes:

* `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_unplug` - Is capable of CPU hot unplug (no reboot required)
* `ram_hot_unplug` - Is capable of memory hot unplug (no reboot required)
* `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.

## Import

Resource Snapshot can be imported using the `snapshot id`, e.g.

```shell
terraform import ionoscloud_snapshot.mysnapshot snapshot uuid
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ionos.com/cloud/tools-terraform/docs/resources/snapshot.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
