diff options
| author | Kumar Damani <me@kumardamani.net> | 2026-07-01 03:54:20 +0000 |
|---|---|---|
| committer | Kumar Damani <me@kumardamani.net> | 2026-07-01 03:54:20 +0000 |
| commit | bc1ad567d2eac46088285ed7d2d688fffc91a82f (patch) | |
| tree | 9677640e074c1c2d38e26f71350b81519bc4232a /terraform | |
| parent | a125ec65a120ce23e4e692a48eaa169bc40e5506 (diff) | |
updates to ans. and tf
Diffstat (limited to 'terraform')
| -rwxr-xr-x[-rw-r--r--] | terraform/.envrc | 0 | ||||
| -rwxr-xr-x[-rw-r--r--] | terraform/README.md | 0 | ||||
| -rwxr-xr-x[-rw-r--r--] | terraform/con.env.example | 0 | ||||
| -rwxr-xr-x[-rw-r--r--] | terraform/main.tf | 123 | ||||
| -rwxr-xr-x[-rw-r--r--] | terraform/terraform.tf | 5 | ||||
| -rwxr-xr-x[-rw-r--r--] | terraform/variables.tf | 0 |
6 files changed, 90 insertions, 38 deletions
diff --git a/terraform/.envrc b/terraform/.envrc index 07b3715..07b3715 100644..100755 --- a/terraform/.envrc +++ b/terraform/.envrc diff --git a/terraform/README.md b/terraform/README.md index 11c1762..11c1762 100644..100755 --- a/terraform/README.md +++ b/terraform/README.md diff --git a/terraform/con.env.example b/terraform/con.env.example index a1ddc29..a1ddc29 100644..100755 --- a/terraform/con.env.example +++ b/terraform/con.env.example diff --git a/terraform/main.tf b/terraform/main.tf index 599d61d..76d5b7a 100644..100755 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -9,6 +9,7 @@ resource "proxmox_lxc" "minio" { memory = 2048 start = true onboot = true + startup = "order=2,up=30" ssh_public_keys = <<-EOT ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9ONfhaHpY0bSk3o81H/eEp+UxQ9RCszJ7p3f+rvcpH kdam0@art-sr @@ -43,6 +44,7 @@ resource "proxmox_lxc" "sites" { memory = 1024 start = true onboot = true + startup = "order=3" ssh_public_keys = <<-EOT ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9ONfhaHpY0bSk3o81H/eEp+UxQ9RCszJ7p3f+rvcpH kdam0@art-sr @@ -66,36 +68,6 @@ resource "proxmox_lxc" "sites" { } } -resource "proxmox_lxc" "rproxy" { - target_node = "hesh" - hostname = "rproxy" - ostemplate = "local:vztmpl/alpine-3.18-default_20230607_amd64.tar.xz" - password = "${var.rproxy_password}" - unprivileged = true - cores = 1 - cpulimit = 1 - memory = 1024 - start = true - onboot = true - - ssh_public_keys = <<-EOT - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9ONfhaHpY0bSk3o81H/eEp+UxQ9RCszJ7p3f+rvcpH kdam0@art-sr - EOT - - rootfs { - storage = "local-lvm" - size = "2G" - } - - network { - name = "eth0" - bridge = "vmbr1" - tag = 30 - ip = "dhcp" - mtu = "1420" - } -} - resource "proxmox_lxc" "monitoring" { target_node = "hesh" hostname = "monitoring" @@ -107,6 +79,7 @@ resource "proxmox_lxc" "monitoring" { memory = 1024 start = true onboot = true + startup = "order=3" ssh_public_keys = <<-EOT ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9ONfhaHpY0bSk3o81H/eEp+UxQ9RCszJ7p3f+rvcpH kdam0@art-sr @@ -137,10 +110,11 @@ resource "proxmox_lxc" "nc_kumar" { password = "${var.nc_kumar_password}" unprivileged = false cores = 8 - cpulimit = 8 + cpulimit = 0 memory = 12288 start = true onboot = true + startup = "order=3" ssh_public_keys = <<-EOT ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9ONfhaHpY0bSk3o81H/eEp+UxQ9RCszJ7p3f+rvcpH kdam0@art-sr @@ -172,11 +146,12 @@ resource "proxmox_lxc" "plex" { ostemplate = "local:vztmpl/debian-12-standard_12.0-1_amd64.tar.zst" password = "${var.plex_password}" unprivileged = false - cores = 8 - cpulimit = 8 + cores = 4 + cpulimit = 0 memory = 4096 start = true onboot = true + startup = "order=3" ssh_public_keys = <<-EOT ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9ONfhaHpY0bSk3o81H/eEp+UxQ9RCszJ7p3f+rvcpH kdam0@art-sr @@ -196,7 +171,7 @@ resource "proxmox_lxc" "plex" { network { name = "eth0" bridge = "vmbr1" - tag = 30 + tag = 0 ip = "dhcp" mtu = "1420" } @@ -213,6 +188,7 @@ resource "proxmox_lxc" "vault" { memory = 1024 start = true onboot = true + startup = "order=3" ssh_public_keys = <<-EOT ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9ONfhaHpY0bSk3o81H/eEp+UxQ9RCszJ7p3f+rvcpH kdam0@art-sr @@ -243,10 +219,11 @@ resource "proxmox_lxc" "torrents" { password = "${var.torrents_password}" unprivileged = false cores = 2 - cpulimit = 2 - memory = 2048 + cpulimit = 0 + memory = 4096 start = true onboot = true + startup = "order=3" ssh_public_keys = <<-EOT ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9ONfhaHpY0bSk3o81H/eEp+UxQ9RCszJ7p3f+rvcpH kdam0@art-sr @@ -283,6 +260,7 @@ resource "proxmox_lxc" "med_dl" { memory = 2048 start = true onboot = true + startup = "order=3" ssh_public_keys = <<-EOT ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9ONfhaHpY0bSk3o81H/eEp+UxQ9RCszJ7p3f+rvcpH kdam0@art-sr @@ -307,3 +285,76 @@ resource "proxmox_lxc" "med_dl" { mtu = "1420" } } + +resource "proxmox_vm_qemu" "torrents_2" { + target_node = "hesh" + name = "torrents-2" + memory = 4096 + start_at_node_boot = true + boot = "order=virtio0;net0" + clone_id = 104 + full_clone = true + scsihw = "virtio-scsi-single" + + startup_shutdown { + order = 3 + } + + cpu { + cores = 2 + } + + disk { + type = "disk" + slot = "virtio0" + size = "100G" + storage = "local-lvm" + } + + network { + id = 0 + model = "virtio" + bridge = "vmbr1" + tag = 30 + mtu = 1420 + } +} + +resource "proxmox_vm_qemu" "rproxy_2" { + target_node = "hesh" + name = "rproxy-2" + memory = 1024 + start_at_node_boot = true + boot = "order=virtio0;net0" + clone_id = 104 + full_clone = true + scsihw = "virtio-scsi-single" + + startup_shutdown { + order = 3 + } + + cpu { + cores = 1 + } + + disk { + type = "disk" + slot = "virtio0" + size = "10G" + storage = "local-lvm" + } + + network { + id = 0 + model = "virtio" + bridge = "vmbr1" + tag = 30 + mtu = 1420 + } +} + +moved { + from = proxmox_lxc.nckumar + to = proxmox_lxc.nc_kumar +} diff --git a/terraform/terraform.tf b/terraform/terraform.tf index 64842b0..a9463ab 100644..100755 --- a/terraform/terraform.tf +++ b/terraform/terraform.tf @@ -1,12 +1,13 @@ terraform { required_providers { proxmox = { - source = "telmate/proxmox" - version = ">=1.0.0" + source = "Telmate/proxmox" + version = "3.0.2-rc07" } } } provider "proxmox" { # Configuration options + pm_tls_insecure = true } diff --git a/terraform/variables.tf b/terraform/variables.tf index 00b96c8..00b96c8 100644..100755 --- a/terraform/variables.tf +++ b/terraform/variables.tf |
