Snippet creation working
This commit is contained in:
+4
-4
@@ -14,13 +14,13 @@ data "dns_aaaa_record_set" "cluster_api" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
data "dns_a_record_set" "guests" {
|
data "dns_a_record_set" "guests" {
|
||||||
for_each = [ for guest in var.vm_guests: "${guest.name}.${var.local_domain}" ]
|
for_each = toset([ for guest in var.vm_guests: guest.name ])
|
||||||
host = each.value
|
host = "${each.value}.${var.local_domain}"
|
||||||
}
|
}
|
||||||
|
|
||||||
data "dns_aaaa_record_set" "guests" {
|
data "dns_aaaa_record_set" "guests" {
|
||||||
for_each = [ for guest in var.vm_guests: "${guest.name}.${var.local_domain}" ]
|
for_each = toset([ for guest in var.vm_guests: guest.name ])
|
||||||
host = each.value
|
host = "${each.value}.${var.local_domain}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -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) }
|
for_each = { for guest in var.vm_guests: guest.name => guest if contains(["controlplane", "worker"], guest.role) }
|
||||||
content_type = "snippets"
|
content_type = "snippets"
|
||||||
datastore_id = "local"
|
datastore_id = "local"
|
||||||
node_name = each.value.node
|
node_name = each.value.host
|
||||||
overwrite = true
|
overwrite = true
|
||||||
source_raw {
|
source_raw {
|
||||||
data = data.talos_machine_configuration.this[each.key].machine_configuration
|
data = data.talos_machine_configuration.this[each.key].machine_configuration
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ ipv4_nameservers = [
|
|||||||
{address = "10.96.10.254"}
|
{address = "10.96.10.254"}
|
||||||
]
|
]
|
||||||
ipv6_nameservers = [
|
ipv6_nameservers = [
|
||||||
{address = "2600:4040:593d:8b10::53"}
|
{address = "2600:4040:593d:8b10:6662:66ff:fe21:e9c4"}
|
||||||
]
|
]
|
||||||
local_domain = "balsillie.house"
|
local_domain = "balsillie.house"
|
||||||
search_domains = [
|
search_domains = [
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ provider "proxmox" {
|
|||||||
random_vm_id_end = 99999
|
random_vm_id_end = 99999
|
||||||
ssh {
|
ssh {
|
||||||
username = "ladmin"
|
username = "ladmin"
|
||||||
agent = true
|
# SSH Private Key provided by env var PROXMOX_VE_SSH_PRIVATE_KEY
|
||||||
|
agent = false
|
||||||
node_address_source = "dns"
|
node_address_source = "dns"
|
||||||
node {
|
node {
|
||||||
name = "hv01"
|
name = "hv01"
|
||||||
|
|||||||
@@ -38,5 +38,5 @@ cluster:
|
|||||||
- name:
|
- name:
|
||||||
contents:
|
contents:
|
||||||
adminKubeconfig:
|
adminKubeconfig:
|
||||||
certLifetime: 10y
|
certLifetime: "87600h" # 10 years (24 hours * 365 * 10)
|
||||||
allowSchedulingOnControlPlanes: false
|
allowSchedulingOnControlPlanes: false
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
apiVersion: v1alpha1
|
apiVersion: v1alpha1
|
||||||
kind: HostnameConfig
|
kind: HostnameConfig
|
||||||
hostname: ${hostname}.$(local_domain)
|
hostname: ${hostname}.${local_domain}
|
||||||
auto: off
|
auto: off
|
||||||
@@ -17,7 +17,8 @@ machine:
|
|||||||
grubUseUKICmdline: true
|
grubUseUKICmdline: true
|
||||||
legacyBIOSSupport: false
|
legacyBIOSSupport: false
|
||||||
features:
|
features:
|
||||||
kubernetesTalosAPIAccess: false
|
kubernetesTalosAPIAccess:
|
||||||
|
enabled: false
|
||||||
diskQuotaSupport: false
|
diskQuotaSupport: false
|
||||||
kubePrism:
|
kubePrism:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|||||||
@@ -2,10 +2,7 @@ variable "vm_guests" {
|
|||||||
type = list(object({
|
type = list(object({
|
||||||
name = string
|
name = string
|
||||||
host = string
|
host = string
|
||||||
ipv4_address = string
|
|
||||||
role = string
|
role = string
|
||||||
cpu = number
|
|
||||||
memory = number
|
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user