This commit is contained in:
Arthur Dodin
2026-05-05 11:50:46 +02:00
parent ffde04bdec
commit a35261ea30
4 changed files with 891 additions and 52 deletions
+27 -8
View File
@@ -1,7 +1,27 @@
resource "proxmox_virtual_environment_vm" "vm_ubuntu" {
data "proxmox_files" "ubuntu_image" {
content_type = "import"
node_name = var.target_node
datastore_id = "local"
file_name_regex = "jammy"
}
resource "proxmox_virtual_environment_vm" "vm_ubuntu_iscsi" {
count = 3
vm_id = 100 + count.index + 2
name = "ubuntu-cloud-vm-${count.index + 1}"
node_name = var.target_node
name = "vm-ubuntu"
vm_id = 1100
initialization {
ip_config {
ipv4 {
address = "dhcp"
}
}
user_account {
username = "root"
password = "rootroot"
}
}
cpu {
cores = 2
@@ -12,14 +32,13 @@ resource "proxmox_virtual_environment_vm" "vm_ubuntu" {
}
network_device {
bridge = "vmbr0"
bridge = "vmbr1"
}
disk {
import_from = "local:iso/jammy-server-cloudimg-amd64.img"
interface = "scsi0"
datastore_id = "truenas_lvm"
import_from = data.proxmox_files.ubuntu_image.files[0].id
}
initialization {
}
}