freebox_virtual_machine
(Resource)
Manages a virtual machine instance within a Freebox. See the Freebox blog for additional details
Example
resource "freebox_virtual_machine" "example" {
name = "vm"
vcpus = 1
memory = 300
disk_path = "Freebox/VMs/debian.qcow2"
disk_type = "qcow2"
os = "ubuntu"
timeouts = {
kill = "15s"
networking = "30s"
}
}
output "ipv4" {
value = one(resource.freebox_virtual_machine.example.networking[*].ipv4)
}
Schema
Required
disk_path
(String) Path to the hard disk image of this VMdisk_type
(String) Type of disk imagememory
(Number) Memory allocated to this VM in megabytesname
(String) Name of this VMvcpus
(Number) Number of virtual CPUs to allocate to this VM
Optional
bind_usb_ports
(List of String) List of ports that should be bound to this VM. Only one VM can use USB at given time, whether is uses only one or all USB ports. The list of system USB ports is available in VmSystemInfo. For example:usb-external-type-a
,usb-external-type-c
cd_path
(String) Path to CDROM device ISO imagecloudinit_hostname
(String) When cloudinit is enabled, hostname desired for this VM.cloudinit_userdata
(String) When cloudinit is enabled, raw YAML to be passed in the user-data file.enable_cloudinit
(Boolean) Whether or not to enable passing data throughcloudinit
. This uses the NoCloud iso image method; it will add a virtual CDROM drive (distinct from the one passed bycd_path
) with the data incloudinit_userdata
andcloudinit_hostname
when enabledenable_screen
(Boolean) Whether or not this VM should have a virtual screen, to use with the VNC websocket protocolos
(String) Type of OS used for this VM. Only used to set an icon for nowstatus
(String) VM statustimeouts
(Attributes) Timeouts for various operations expressed as strings such as30s
or2h45m
where valid time units ares
(seconds),m
(minutes) andh
(hours) (see below for nested schema)
Read-Only
id
(Number) Unique identifier of the VMmac
(String) VM ethernet interface MAC addressnetworking
(Attributes Set) Network binds of the virtual machine (see below for nested schema)
Nested Schema for timeouts
Optional:
create
(String) Timeout for resource creation (default:"5m"
)delete
(String) Timeout for resource deletion (default:"5m"
)kill
(String) Duration to wait for a graceful shutdown before force killing the virtual machine (default:"30s"
)networking
(String) Duration to wait for the virtual machine to appear on the network (default:"1m"
)read
(String) Timeout for resource refreshing (default:"5m"
)update
(String) Timeout for resource updating (default:"5m"
)
Nested Schema for networking
Read-Only:
interface
(String) Name of the network interface the virtual machine is bound toipv4
(String) Unique IPV4 address on the network interfaceipv6
(Set of String) List of IPV6 addresses on the network interface
Import
# ------------------------------------------------ 👇 is the ID of the virtual machine
terraform import "freebox_virtual_machine.example" 42