From f9382d0b2a05b3b49f3b6b5314bc495012012e94 Mon Sep 17 00:00:00 2001 From: Matt Reeves Date: Sat, 7 Dec 2024 17:29:28 -0500 Subject: [PATCH] add plausible, remove k3s --- terraform/proxmox/k3s-master2.tf | 67 ------------------- terraform/proxmox/k3s-master3.tf | 67 ------------------- .../proxmox/{k3s-master.tf => plausible.tf} | 23 +++---- 3 files changed, 11 insertions(+), 146 deletions(-) delete mode 100644 terraform/proxmox/k3s-master2.tf delete mode 100644 terraform/proxmox/k3s-master3.tf rename terraform/proxmox/{k3s-master.tf => plausible.tf} (71%) diff --git a/terraform/proxmox/k3s-master2.tf b/terraform/proxmox/k3s-master2.tf deleted file mode 100644 index 2b640df..0000000 --- a/terraform/proxmox/k3s-master2.tf +++ /dev/null @@ -1,67 +0,0 @@ -resource "proxmox_virtual_environment_vm" "K3s-Master2" { - - # VM General Settings - node_name = "pve2" - vm_id = 321 - name = "K3s-Master2" - description = "Kubernetes Master" - tags = ["tofu", "ubuntu-22", "auto-homelab-repo", "infrastructure"] - started = false - - agent { - enabled = true # read 'Qemu guest agent' section, change to true only when ready - } - - clone { - vm_id = 8005 - } - - # VM CPU Settings - cpu { - cores = 4 - type = "host" - architecture = "x86_64" - } - - # VM Memory Settings - memory { - dedicated = 8192 - } - - # VM Network Settings - network_device { - bridge = "vmbr0" - vlan_id = 1 - } - - # VM Disk Settings - disk { - datastore_id = "local-lvm" - size = 100 - interface = "scsi0" - } - - vga { - type = "serial0" - } - - initialization { - ip_config { - ipv4 { - address = "dhcp" - } - } - - user_account {} - } - - lifecycle { - ignore_changes = [ - initialization[0].user_account[0].keys, - initialization[0].user_account[0].password, - initialization[0].user_account[0].username, - initialization[0].user_data_file_id - ] - } - -} diff --git a/terraform/proxmox/k3s-master3.tf b/terraform/proxmox/k3s-master3.tf deleted file mode 100644 index 19eb715..0000000 --- a/terraform/proxmox/k3s-master3.tf +++ /dev/null @@ -1,67 +0,0 @@ -resource "proxmox_virtual_environment_vm" "K3s-Master3" { - - # VM General Settings - node_name = "prox" - vm_id = 330 - name = "K3s-Master3" - description = "Kubernetes master" - tags = ["tofu", "ubuntu-22", "auto-homelab-repo", "infrastructure"] - started = false - - agent { - enabled = true # read 'Qemu guest agent' section, change to true only when ready - } - - clone { - vm_id = 8000 - } - - # VM CPU Settings - cpu { - cores = 4 - type = "host" - architecture = "x86_64" - } - - # VM Memory Settings - memory { - dedicated = 8192 - } - - # VM Network Settings - network_device { - bridge = "vmbr0" - vlan_id = 1 - } - - # VM Disk Settings - disk { - datastore_id = "Fast2Tb" - size = 100 - interface = "scsi0" - } - - vga { - type = "serial0" - } - - initialization { - ip_config { - ipv4 { - address = "dhcp" - } - } - - user_account {} - } - - lifecycle { - ignore_changes = [ - initialization[0].user_account[0].keys, - initialization[0].user_account[0].password, - initialization[0].user_account[0].username, - initialization[0].user_data_file_id - ] - } - -} diff --git a/terraform/proxmox/k3s-master.tf b/terraform/proxmox/plausible.tf similarity index 71% rename from terraform/proxmox/k3s-master.tf rename to terraform/proxmox/plausible.tf index 7229c72..adffc14 100644 --- a/terraform/proxmox/k3s-master.tf +++ b/terraform/proxmox/plausible.tf @@ -1,31 +1,30 @@ -resource "proxmox_virtual_environment_vm" "K3s-Master" { +resource "proxmox_virtual_environment_vm" "Plausible" { # VM General Settings node_name = "prox" - vm_id = 300 - name = "K3s-Master" - description = "Kubernetes master" - tags = ["tofu", "ubuntu-22", "auto-homelab-repo", "infrastructure"] - started = false + vm_id = 102 + name = "Plausible" + description = "Plausible" + tags = ["tofu", "ubuntu24", "iac-repo", "infrastructure"] agent { enabled = true # read 'Qemu guest agent' section, change to true only when ready } clone { - vm_id = 8000 + vm_id = 9996 } # VM CPU Settings cpu { - cores = 4 + cores = 2 type = "host" architecture = "x86_64" } # VM Memory Settings memory { - dedicated = 8192 + dedicated = 2048 } # VM Network Settings @@ -37,7 +36,7 @@ resource "proxmox_virtual_environment_vm" "K3s-Master" { # VM Disk Settings disk { datastore_id = "Fast2Tb" - size = 100 + size = 30 interface = "scsi0" } @@ -52,7 +51,7 @@ resource "proxmox_virtual_environment_vm" "K3s-Master" { } } - user_account {} + user_data_file_id = proxmox_virtual_environment_file.cloud_config.id } lifecycle { @@ -64,4 +63,4 @@ resource "proxmox_virtual_environment_vm" "K3s-Master" { ] } -} +} \ No newline at end of file