freebox_virtual_disk (Resource)

Manages a virtual disk image within a Freebox

Example

resource "freebox_virtual_disk" "example" {
  path         = "/Freebox/VMs/disk.qcow2"
  virtual_size = 10 * 1024 * 1024 * 1024 # 10 GB
  resize_from  = "/Freebox/debian.qcow2"
}

output "size_on_disk" {
  value = resource.freebox_virtual_disk.example.size_on_disk
}

output "disk_type" {
  value = resource.freebox_virtual_disk.example.type # "qcow2"
}

Schema

Required

  • path (String) Path to the virtual disk on the Freebox

Optional

  • polling (Attributes) Polling configuration (see below for nested schema)
  • resize_from (String) Path to the virtual disk to resize from
  • type (String) Type of virtual disk. If not specified, the type will be inferred from the resize from file or be set to qcow2
  • virtual_size (Number) Size in bytes of virtual disk. This is the size the disk will appear inside the VM.

Read-Only

  • size_on_disk (Number) Space in bytes used by virtual image on the hard drive. This is how much filesystem space is consumed on the box.

Nested Schema for polling

Optional:

Nested Schema for polling.checksum

Optional:

  • interval (String) The interval at which to poll.
  • timeout (String) The timeout for the operation.

Nested Schema for polling.copy

Optional:

  • interval (String) The interval at which to poll.
  • timeout (String) The timeout for the operation.

Nested Schema for polling.create

Optional:

  • interval (String) The interval at which to poll.
  • timeout (String) The timeout for the operation.

Nested Schema for polling.delete

Optional:

  • interval (String) The interval at which to poll.
  • timeout (String) The timeout for the operation.

Nested Schema for polling.move

Optional:

  • interval (String) The interval at which to poll.
  • timeout (String) The timeout for the operation.

Nested Schema for polling.resize

Optional:

  • interval (String) The interval at which to poll.
  • timeout (String) The timeout for the operation.

Import

# --------------------------------------------- 👇 is the path of the virtual disk
terraform import "freebox_virtual_disk.example" /Freebox/VMs/disk.qcow2