6.10.1. cloupard_kvm_instance
Defines a KVM virtual machine instance.
Example usage
resource "cloupard_kvm_instance" "vm1" {
region = "kz_ala2"
cod = "almaty2"
name = "tf_vm1"
description = "test vm from tf"
vm_type = "universal_lin"
os_template = "debian_12_minimal"
os_admin_pass = "Qwer1234"
ssh_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJbOIrkRQapl6EGXleO0VUq0ZWZ65+YSwF6i/1TqYsIb infraaccess"
running = true
in_test = true
vcpu = 2
vram = 2
disks = {
"disk0" = {
name = "disk0"
type = "super"
size = 30
description = "System"
bootable = true
},
"disk1" = {
name = "disk1"
type = "standard"
size = 40
description = "Data1"
bootable = false
},
"disk2" = {
name = "disk2"
type = "archive"
size = 45
description = "Data2"
bootable = false
}
}
connections = {
"net0" = {
extip_id = cloupard_kvm_extip.ip2.id
},
"net1" = {
vnet_id = cloupard_kvm_vnet.vnet1.id
},
"net2" = {
vnet_id = cloupard_kvm_vnet.vnet2.id
}
}
}
|
Attributes:
-
region (Required): Region for the virtual machine.
-
cod (Required): Code of deployment site or environment.
-
name (Required): Name of the virtual machine.
-
description (Optional): Description of the instance.
-
vm_type (Required): Type of the virtual machine.
-
os_template (Required): OS image template used for deployment.
-
os_admin_pass (Required): Administrator password for the OS.
-
running (Optional): Whether the instance should start automatically.
-
in_test (Optional): Marks the VM as test.
-
vcpu (Required): Number of virtual CPUs.
-
vram (Required): Amount of virtual RAM in GB.
-
disks (Required): Map of disk definitions. Each disk block includes:name (Required): Name of the disk.type (Required): Disk type (e.g., super, standard, archive).size (Required): Disk size in GB.description (Optional): Disk description.bootable (Required): Whether the disk is bootable.
-
connections (Optional): Network interface definitions. Each connection includes:extip_id (Optional): External IP ID (if public).vnet_id (Optional): Virtual network ID.
-
id (Computed): Unique identifier for the virtual machine.