From 8b8b6d1a3d83849d878d7fdb220976b4773a925c Mon Sep 17 00:00:00 2001 From: Chewbaccalakis Date: Thu, 2 Jul 2026 22:40:04 -0700 Subject: [PATCH] renamed pve2 node to goose --- main.tf | 16 +++++++++------- providers.tf | 6 +++--- secrets.tmpl | 2 +- terraform.tfvars | 8 ++++---- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/main.tf b/main.tf index 930fc1f..69a3574 100644 --- a/main.tf +++ b/main.tf @@ -54,13 +54,15 @@ module "proxmox" { } } -module "pve2" { + + +module "goose" { source = "./opentofu/modules/proxmox_node" - node_name = var.hypervisors["pve2"].node_name - storage = var.hypervisors["pve2"].storage - lxc = try(var.nodes["pve2"].lxc, {}) - machines = try(var.nodes["pve2"].machines, {}) + node_name = var.hypervisors["goose"].node_name + storage = var.hypervisors["goose"].storage + lxc = try(var.nodes["goose"].lxc, {}) + machines = try(var.nodes["goose"].machines, {}) search_domain = local.node_common.search_domain dns_nameservers = local.node_common.dns_nameservers ssh_key = local.node_common.ssh_key @@ -69,14 +71,14 @@ module "pve2" { ssh_private_key_path = local.node_common.ssh_private_key_path providers = { - proxmox = proxmox.pve2 + proxmox = proxmox.goose } } locals { hv_hosts = { proxmox = { lxc = module.proxmox.lxc_hosts, vm = module.proxmox.vm_hosts } - pve2 = { lxc = module.pve2.lxc_hosts, vm = module.pve2.vm_hosts } + goose = { lxc = module.goose.lxc_hosts, vm = module.goose.vm_hosts } } all_hosts = flatten([ diff --git a/providers.tf b/providers.tf index 6892026..b0ec7d3 100644 --- a/providers.tf +++ b/providers.tf @@ -74,9 +74,9 @@ provider "proxmox" { } provider "proxmox" { - alias = "pve2" - pm_api_url = var.hypervisors["pve2"].api_url + alias = "goose" + pm_api_url = var.hypervisors["goose"].api_url pm_api_token_id = data.external.infisical.result["token_id"] - pm_api_token_secret = data.external.infisical.result["pve2_token_secret"] + pm_api_token_secret = data.external.infisical.result["goose_token_secret"] pm_tls_insecure = true } diff --git a/secrets.tmpl b/secrets.tmpl index cf2b904..fc34e11 100644 --- a/secrets.tmpl +++ b/secrets.tmpl @@ -3,7 +3,7 @@ {{- range $secret := $secrets }} {{- if eq $secret.Key "HV_USER" }}"token_id": "{{$secret.Value}}",{{ end }} {{- if eq $secret.Key "PROXMOX_TOKEN_SECRET" }}"hv2_token_secret": "{{$secret.Value}}",{{ end }} - {{- if eq $secret.Key "PVE2_TOKEN_SECRET" }}"pve2_token_secret": "{{$secret.Value}}",{{ end }} + {{- if eq $secret.Key "GOOSE_TOKEN_SECRET" }}"goose_token_secret": "{{$secret.Value}}",{{ end }} {{- if eq $secret.Key "LXC_PASSWORD" }}"lxc_password": "{{$secret.Value}}",{{ end }} {{- if eq $secret.Key "SSH_PRIVATE_KEY" }}"ssh_private_key_b64": "{{$secret.Value}}",{{ end }} {{- if eq $secret.Key "SSH_PUBLIC_KEY" }}"ssh_public_key": "{{$secret.Value}}",{{ end }} diff --git a/terraform.tfvars b/terraform.tfvars index 4f046ac..eb9269f 100644 --- a/terraform.tfvars +++ b/terraform.tfvars @@ -6,9 +6,9 @@ hypervisors = { node_name = "pve" storage = "local-lvm" } - pve2 = { + goose = { api_url = "https://192.168.0.241:8006/api2/json" - node_name = "pve" + node_name = "goose" storage = "local-lvm" } } @@ -43,7 +43,7 @@ dns_records = [ { zone = "oswaldtheotter.lan", name = "omada", type = "A", value = "192.168.0.110" }, { zone = "oswaldtheotter.lan", name = "portanas", type = "A", value = "192.168.0.4" }, { zone = "oswaldtheotter.lan", name = "proxmox", type = "A", value = "192.168.0.240" }, - { zone = "oswaldtheotter.lan", name = "pve", type = "A", value = "192.168.0.241" }, + { zone = "oswaldtheotter.lan", name = "goose", type = "A", value = "192.168.0.241" }, { zone = "oswaldtheotter.lan", name = "nas", type = "CNAME", value = "portanas.oswaldtheotter.lan" }, { zone = "oswaldtheotter.lan", name = "s3", type = "CNAME", value="portanas.oswaldtheotter.lan"}, { zone = "oswaldtheotter.lan", name = "hass", type = "A", value="192.168.0.70"}, @@ -159,7 +159,7 @@ nodes = { machines = { } } - pve2 = { + goose = { lxc = { "dev" = { hostname = "dev"