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 fromtype(String) Type of virtual disk. If not specified, the type will be inferred from the resize from file or be set to qcow2virtual_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:
checksum(Attributes) Polling configuration for checksum compute operation (see below for nested schema)copy(Attributes) Polling configuration for copy operation (see below for nested schema)create(Attributes) Polling configuration for create operation (see below for nested schema)delete(Attributes) Polling configuration for delete operation (see below for nested schema)move(Attributes) Polling configuration for move operation (see below for nested schema)resize(Attributes) Polling configuration for resize operation (see below for nested schema)
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