Remove tfplan

This commit is contained in:
2026-09-02 14:14:49 -04:00
parent ae8bf2926f
commit 2d661a1a76
7 changed files with 57 additions and 5 deletions
+1
View File
@@ -2,4 +2,5 @@ locals {
hv01_id = [ for node in data.proxmox_virtual_environment_node.hvc01 : node if node.node_name == "hv01"][0].id hv01_id = [ for node in data.proxmox_virtual_environment_node.hvc01 : node if node.node_name == "hv01"][0].id
# Validate talos_version variable # Validate talos_version variable
talos_version = [ for version in data.talos_image_factory_versions.this.talos_versions : version if version == var.talos_version][0] 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"
} }
+2 -1
View File
@@ -11,5 +11,6 @@ output "talos_schematic_id" {
output "debug" { output "debug" {
description = "For debugging resource or data key values" description = "For debugging resource or data key values"
value = data.talos_image_factory_urls.this.urls value = data.talos_machine_configuration.this["cp01"]
sensitive = false
} }
Binary file not shown.
+2 -1
View File
@@ -1,2 +1,3 @@
talos_version = "v1.13.9" talos_version = "v1.13.9"
cluster_endpoint = "https://k8s01.balsillie.house:6443" cluster_name = "k8s01.balsillie.house"
kubernetes_version = "1.36.3"
+13
View File
@@ -16,4 +16,17 @@ data "talos_image_factory_urls" "this" {
talos_version = local.talos_version talos_version = local.talos_version
schematic_id = talos_image_factory_schematic.this.id schematic_id = talos_image_factory_schematic.this.id
platform = "nocloud" platform = "nocloud"
}
data "talos_machine_configuration" "this" {
for_each = { for guest in var.vm_guests: guest.name => guest if contains(["controlplane", "worker"], guest.role) }
cluster_endpoint = local.cluster_endpoint
cluster_name = var.cluster_name
config_patches = []
docs = false
examples = false
kubernetes_version = var.kubernetes_version
machine_secrets = talos_machine_secrets.this.machine_secrets
machine_type = each.value.role
talos_version = local.talos_version
} }
+5 -1
View File
@@ -13,6 +13,10 @@ variable "talos_version" {
type = string type = string
} }
variable "cluster_endpoint" { variable "cluster_name" {
type = string
}
variable "kubernetes_version" {
type = string type = string
} }
+34 -2
View File
@@ -4,7 +4,39 @@ vm_guests = [
host = "hv01" host = "hv01"
ipv4_address = "10.96.10.61" ipv4_address = "10.96.10.61"
memory = 4096 memory = 4096
name = "k8s01-cp01" name = "cp01"
role = "talos_control_plane" role = "controlplane"
},
{
cpu = 1
host = "hv02"
ipv4_address = "10.96.10.62"
memory = 4096
name = "cp02"
role = "controlplane"
},
{
cpu = 1
host = "hv03"
ipv4_address = "10.96.10.63"
memory = 4096
name = "cp03"
role = "controlplane"
},
{
cpu = 1
host = "hv02"
ipv4_address = "10.96.10.64"
memory = 4096
name = "wn01"
role = "worker"
},
{
cpu = 1
host = "hv03"
ipv4_address = "10.96.10.65"
memory = 4096
name = "wn02"
role = "worker"
} }
] ]