Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance disk block doc #1200

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion docs/resources/vm_qemu.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,22 @@ Due to the complexity of the `disk` block, there is a settings matrix that can b
|`replicate` |`bool` |`false`|Whether the drive should considered for replication jobs.|
|`serial` |`string`| |The serial number of the disk.|
|`size` |`string`| |The size of the created disk. Accepts `K` for kibibytes, `M` for mebibytes, `G` for gibibytes, `T` for tibibytes. When only a number is provided gibibytes is assumed. **Required** when `type`=`disk` and `passthrough`=`false`, **Computed** when `type`=`disk` and `passthrough`=`true`. |
|`slot` |`string`| |**Required** The slot id of the disk.|
|`slot` |`string`| |**Required** The slot id of the disk - must be one of 'ide0', 'ide1', 'ide2', 'sata0', 'sata1', 'sata2', 'sata3', 'sata4', 'sata5', 'scsi0', 'scsi1', 'scsi2', 'scsi3', 'scsi4', 'scsi5', 'scsi6', 'scsi7', 'scsi8', 'scsi9', 'scsi10', 'scsi11', 'scsi12', 'scsi13', 'scsi14', 'scsi15', 'scsi16', 'scsi17', 'scsi18', 'scsi19', 'scsi20', 'scsi21', 'scsi22', 'scsi23', 'scsi24', 'scsi25', 'scsi26', 'scsi27', 'scsi28', 'scsi29', 'scsi30', 'virtio0', 'virtio1', 'virtio2', 'virtio3', 'virtio4', 'virtio5', 'virtio6', 'virtio7', 'virtio8', 'virtio9', 'virtio10', 'virtio11', 'virtio12', 'virtio13', 'virtio14', 'virtio15'|
|`storage` |`string`| |Required when `type`=`disk` and `passthrough`=`false`. The name of the storage pool on which to store the disk.|
|`type` |`string`|`disk` |The type of disk to create. Options: `cdrom`, `cloudinit` ,`disk`.|
|`wwn` |`string`| |The WWN of the disk.|

Example `Disk block` using an existing vm as a template.

```hcl
disk {
type = "disk"
disk_file = "local-lvm:vm-<<<vmid>>>-disk-<<<disk number>>>"
passthrough = true
slot = "scsi0"
}
```

#### Disk compatibility matrix

**Note** `cloudinit` can only be used with `ide`, `sata` and `scsi` disk types.
Expand Down