From c10aded847be01dfd7869eb5da433171ba547a13 Mon Sep 17 00:00:00 2001 From: pgijsbertsen <117165507+pgijsbertsen@users.noreply.github.com> Date: Fri, 28 Nov 2025 12:39:21 +0100 Subject: [PATCH] feat: Add talosconfig and kubeconfig outputs --- .../k8s-wheatley/modules/talos-bootstrap/main.tf | 5 +++++ .../k8s-wheatley/modules/talos-bootstrap/outputs.tf | 9 +++++++++ pve01.wheatley.in/k8s-wheatley/outputs.tf | 9 +++++++++ 3 files changed, 23 insertions(+) create mode 100644 pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/outputs.tf create mode 100644 pve01.wheatley.in/k8s-wheatley/outputs.tf diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/main.tf b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/main.tf index abc314d..1563085 100644 --- a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/main.tf +++ b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/main.tf @@ -95,3 +95,8 @@ resource "talos_machine_bootstrap" "talos_machine_bootstrap" { client_configuration = talos_machine_secrets.machine_secrets.client_configuration node = var.talos_nodes[0].ipv4_address } + +resource "talos_cluster_kubeconfig" "kubeconfig" { + client_configuration = talos_machine_secrets.machine_secrets.client_configuration + node = var.node_config.cluster_endpoint +} diff --git a/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/outputs.tf b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/outputs.tf new file mode 100644 index 0000000..5d22a81 --- /dev/null +++ b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/outputs.tf @@ -0,0 +1,9 @@ +output "talosconfig" { + value = data.talos_client_configuration.talosconfig.talos_config + sensitive = true +} + +output "kubeconfig" { + value = talos_cluster_kubeconfig.kubeconfig + sensitive = true +} diff --git a/pve01.wheatley.in/k8s-wheatley/outputs.tf b/pve01.wheatley.in/k8s-wheatley/outputs.tf new file mode 100644 index 0000000..6075940 --- /dev/null +++ b/pve01.wheatley.in/k8s-wheatley/outputs.tf @@ -0,0 +1,9 @@ +output "talosconfig" { + value = module.talos-bootstrap.talosconfig + sensitive = true +} + +output "kubeconfig" { + value = module.talos-bootstrap.kubeconfig + sensitive = true +}