Snippet creation working

This commit is contained in:
2026-09-03 18:13:21 -04:00
parent 0fa9d83b94
commit 33dc172296
8 changed files with 12 additions and 13 deletions
+4 -4
View File
@@ -14,13 +14,13 @@ data "dns_aaaa_record_set" "cluster_api" {
}
data "dns_a_record_set" "guests" {
for_each = [ for guest in var.vm_guests: "${guest.name}.${var.local_domain}" ]
host = each.value
for_each = toset([ for guest in var.vm_guests: guest.name ])
host = "${each.value}.${var.local_domain}"
}
data "dns_aaaa_record_set" "guests" {
for_each = [ for guest in var.vm_guests: "${guest.name}.${var.local_domain}" ]
host = each.value
for_each = toset([ for guest in var.vm_guests: guest.name ])
host = "${each.value}.${var.local_domain}"
}
+1 -1
View File
@@ -36,7 +36,7 @@ resource "proxmox_virtual_environment_file" "talos_cloud_init" {
for_each = { for guest in var.vm_guests: guest.name => guest if contains(["controlplane", "worker"], guest.role) }
content_type = "snippets"
datastore_id = "local"
node_name = each.value.node
node_name = each.value.host
overwrite = true
source_raw {
data = data.talos_machine_configuration.this[each.key].machine_configuration
+1 -1
View File
@@ -5,7 +5,7 @@ ipv4_nameservers = [
{address = "10.96.10.254"}
]
ipv6_nameservers = [
{address = "2600:4040:593d:8b10::53"}
{address = "2600:4040:593d:8b10:6662:66ff:fe21:e9c4"}
]
local_domain = "balsillie.house"
search_domains = [
+2 -1
View File
@@ -7,7 +7,8 @@ provider "proxmox" {
random_vm_id_end = 99999
ssh {
username = "ladmin"
agent = true
# SSH Private Key provided by env var PROXMOX_VE_SSH_PRIVATE_KEY
agent = false
node_address_source = "dns"
node {
name = "hv01"
@@ -38,5 +38,5 @@ cluster:
- name:
contents:
adminKubeconfig:
certLifetime: 10y
certLifetime: "87600h" # 10 years (24 hours * 365 * 10)
allowSchedulingOnControlPlanes: false
@@ -2,5 +2,5 @@
apiVersion: v1alpha1
kind: HostnameConfig
hostname: ${hostname}.$(local_domain)
hostname: ${hostname}.${local_domain}
auto: off
@@ -17,7 +17,8 @@ machine:
grubUseUKICmdline: true
legacyBIOSSupport: false
features:
kubernetesTalosAPIAccess: false
kubernetesTalosAPIAccess:
enabled: false
diskQuotaSupport: false
kubePrism:
enabled: false
-3
View File
@@ -2,10 +2,7 @@ variable "vm_guests" {
type = list(object({
name = string
host = string
ipv4_address = string
role = string
cpu = number
memory = number
}))
}