From a7547b24da22f54869e11d779c83c842d68a2ac8 Mon Sep 17 00:00:00 2001 From: Matt Reeves Date: Mon, 3 Jun 2024 01:08:47 -0400 Subject: [PATCH] adding downloaders --- arrbuntu.tf | 4 ++-- downloaders.tf | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++ provider.tf | 8 +++++-- 3 files changed, 73 insertions(+), 4 deletions(-) create mode 100644 downloaders.tf diff --git a/arrbuntu.tf b/arrbuntu.tf index 7260c51..3c2c774 100644 --- a/arrbuntu.tf +++ b/arrbuntu.tf @@ -8,7 +8,7 @@ resource "proxmox_virtual_environment_vm" "Arrbuntu" { tags = ["tofu", "ubuntu-22"] agent { - enabled = false # read 'Qemu guest agent' section, change to true only when ready + enabled = true # read 'Qemu guest agent' section, change to true only when ready } clone { @@ -47,7 +47,7 @@ resource "proxmox_virtual_environment_vm" "Arrbuntu" { ip_config { ipv4 { address = var.arrbuntu_ip_address - gateway = var.arrbuntu_gateway + gateway = var.vlan_gateway } } diff --git a/downloaders.tf b/downloaders.tf new file mode 100644 index 0000000..e096d32 --- /dev/null +++ b/downloaders.tf @@ -0,0 +1,65 @@ +resource "proxmox_virtual_environment_vm" "Downloaders" { + + # VM General Settings + node_name = "prox" + vm_id = 201 + name = "Downloaders" + description = "Sab, Qbitty" + tags = ["tofu", "ubuntu-22"] + + agent { + enabled = false # read 'Qemu guest agent' section, change to true only when ready + } + + clone { + vm_id = 8000 + } + + # VM CPU Settings + cpu { + cores = 3 + type = "host" + } + + # VM Memory Settings + memory { + dedicated = 8192 + } + + # VM Network Settings + network_device { + bridge = "vmbr0" + vlan_id = 1 + } + + # VM Disk Settings + disk { + datastore_id = "Fast2Tb" + size = 260 + interface = "scsi0" + } + + vga { + type = "serial0" + } + + initialization { + ip_config { + ipv4 { + address = var.downloaders_ip_address + gateway = var.vlan_gateway + } + } + + user_account {} + } + + lifecycle { + ignore_changes = [ + initialization[0].user_account[0].keys, + initialization[0].user_account[0].password, + initialization[0].user_account[0].username, + ] + } + +} diff --git a/provider.tf b/provider.tf index 3d37f42..5a33287 100644 --- a/provider.tf +++ b/provider.tf @@ -27,6 +27,10 @@ variable "arrbuntu_ip_address" { type = string } - variable "arrbuntu_gateway" { + variable "vlan_gateway" { type = string -} \ No newline at end of file +} + +variable "downloaders_ip_address" { + type = string +}