> For the complete documentation index, see [llms.txt](https://docs.ionos.com/puppet-v6/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/puppet-v6/types/compute-engine/volume.md).

# volume

Type representing a IonosCloud storage volume.

## Parameters:

| Name            | Required | Description                                                   |
| --------------- | :------: | ------------------------------------------------------------- |
| name            |   true   | The name of the volume.                                       |
| image\_password |          | The image password for the "root" or "Administrator" account. |
| ssh\_keys       |          | One or more SSH keys to allow access to the volume via SSH.   |

## Properties:

| Name                      | Required | Description                                                                                                                                                                                                                                                                                   |
| ------------------------- | :------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ensure                    |    No    | The basic property that the resource should be in. Valid values are `present`, `absent`.                                                                                                                                                                                                      |
| size                      |    No    | The size of the volume in GB.                                                                                                                                                                                                                                                                 |
| image\_id                 |    No    | The image or snapshot ID.                                                                                                                                                                                                                                                                     |
| availability\_zone        |    No    | The availability zone of where the volume will reside.                                                                                                                                                                                                                                        |
| bus                       |    No    | The bus type of the volume. Valid values are `VIRTIO`, `IDE`.                                                                                                                                                                                                                                 |
| volume\_type              |    No    | The volume type. Valid values are `HDD`.                                                                                                                                                                                                                                                      |
| user\_data                |    No    | The cloud-init configuration for the volume as base64 encoded string. The property is immutable and is only allowed to be set on a new volume creation. It is mandatory to provide either 'public image' or 'imageAlias' that has cloud-init compatibility in conjunction with this property. |
| licence\_type             |    No    | The license type of the volume. Valid values are `LINUX`, `WINDOWS`, `WINDOWS2016`, `UNKNOWN`, `OTHER`.                                                                                                                                                                                       |
| device\_number            |    No    | The LUN ID of the storage volume. Null for volumes not mounted to any VM                                                                                                                                                                                                                      |
| pci\_slot                 |    No    | The PCI slot number of the storage volume. Null for volumes not mounted to any VM                                                                                                                                                                                                             |
| backupunit\_id            |    No    | The uuid of the Backup Unit that user has access to. The property is immutable and is only allowed to be set on a new volume creation. It is mandatory to provide either 'public image' or 'imageAlias' in conjunction with this property.                                                    |
| cpu\_hot\_plug            |    No    | Indicates CPU hot plug capability.                                                                                                                                                                                                                                                            |
| ram\_hot\_plug            |    No    | Indicates memory hot plug capability.                                                                                                                                                                                                                                                         |
| nic\_hot\_plug            |    No    | Indicates NIC hot plug capability.                                                                                                                                                                                                                                                            |
| nic\_hot\_unplug          |    No    | Indicates NIC hot unplug capability.                                                                                                                                                                                                                                                          |
| disc\_virtio\_hot\_plug   |    No    | Indicates VirtIO drive hot plug capability.                                                                                                                                                                                                                                                   |
| disc\_virtio\_hot\_unplug |    No    | Indicates VirtIO drive hot unplug capability.                                                                                                                                                                                                                                                 |
| datacenter\_id            |    No    | The ID of the virtual data center where the volume will reside.                                                                                                                                                                                                                               |
| datacenter\_name          |    No    | The name of the virtual data center where the volume will reside.                                                                                                                                                                                                                             |
| id                        |    No    | The volume ID.                                                                                                                                                                                                                                                                                |
| \*\*\*                    |          |                                                                                                                                                                                                                                                                                               |

### Changeable properties:

* size

## Examples

### To list resources:

```bash
puppet resource volume
```

> ***NOTE:*** If two resources have the same name only one of them will be shown.

### To create, update or delete a resource:

```ruby
$datacenter_name = 'TestDataCenter'

datacenter { $datacenter_name :
  ensure   => present,
  location => 'us/las'
}
-> volume { 'testvolume' :
  ensure            => present,
  datacenter_name   => $datacenter_name,
  licence_type      => 'LINUX',
  size              => 50,
  volume_type       => 'SSD',
  availability_zone => 'AUTO',
  bus               => 'IDE',
  cpu_hot_plug      => true,
}
```

> ***NOTE:*** If two resources with the same name ar found an error will be thrown, this only applies to cases where the resource cannot be identified. Example: an error is thrown for two servers with the same name in the same datacenter, not for two servers with the same name, but in different datacenters.


---

# 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 dynamically by asking a question.

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

```
GET https://docs.ionos.com/puppet-v6/types/compute-engine/volume.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
