This commit is contained in:
2026-09-02 21:14:55 -04:00
parent 2d661a1a76
commit af8dcaec06
13 changed files with 200 additions and 3 deletions
+20
View File
@@ -3,4 +3,24 @@ locals {
# Validate talos_version variable
talos_version = [ for version in data.talos_image_factory_versions.this.talos_versions : version if version == var.talos_version][0]
cluster_endpoint = "https://${var.cluster_name}:6443"
machine_config_patches = { for guest in var.vm_guests: guest.name => [
templatefile("${path.root}/templates/talos_hostname_config.yml.tftpl", {
hostname = guest.name
}),
templatefile("${path.root}/templates/talos_link_config.yml.tftpl", {
ipv4_address = guest.ipv4_address
ipv4_subnet_mask = var.ipv4_subnet_mask
ipv4_gateway = var.ipv4_gateway
}),
templatefile("${path.root}/templates/talos_resolver_config.yml.tftpl", {
ipv4_nameservers = var.ipv4_nameservers
ipv6_nameservers = var.ipv6_nameservers
search_domains = var.search_domains
}),
templatefile("${path.root}/templates/talos_timesync_config.yml.tftpl", {
ipv4_ntp_servers = var.ipv4_ntp_servers
ipv6_ntp_servers = var.ipv6_ntp_servers
}),
file("${path.root}/files/talos_kubespan_config.yml")
] if contains(["controlplane", "worker"], guest.role)}
}