Remove tfplan
This commit is contained in:
@@ -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
@@ -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.
@@ -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"
|
||||||
@@ -17,3 +17,16 @@ data "talos_image_factory_urls" "this" {
|
|||||||
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
|
||||||
|
}
|
||||||
@@ -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
@@ -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"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
Reference in New Issue
Block a user