Skip to content

Commit 2bcc13a

Browse files
Merge pull request #66 from pascalinthecloud/65-add-terraform-output-of-schematic_id
feat: add output for Talos image schematic ID
2 parents c88093a + 8076928 commit 2bcc13a

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ A Terraform module for provisioning a Kubernetes cluster on Proxmox using Talos
44

55
Feel free to contact me, open an issue, or contribute to the project. Your feedback and contributions are always welcome! 🤓
66

7+
## Geting kubeconfig & talosconfig
8+
```bash
9+
terraform output --raw kubeconfig > cluster.kubeconfig
10+
terraform output --raw talosconfig > cluster.talosconfig
11+
```
12+
13+
## Upgrading Talos cluster
14+
First we need get the schematic id from the outputs and use that for upgrading the cluster in order to keep the extensions.
15+
```bash
16+
talosctl upgrade --image factory.talos.dev/installer/<SCHEMATIC_ID>:v1.9.3 --preserve
17+
```
18+
The preserve option is only needed when wanting to keep files/directories on Talos nodes (for example when using Longhorn/Rook...)
19+
720
## Example
821

922
```hcl
@@ -136,6 +149,7 @@ module "k8s_cluster_override" {
136149
|------|-------------|
137150
| <a name="output_kubeconfig"></a> [kubeconfig](#output\_kubeconfig) | Kubernetes kubeconfig for the cluster |
138151
| <a name="output_talos_cluster_health"></a> [talos\_cluster\_health](#output\_talos\_cluster\_health) | Health status of the Talos cluster, can be used for other ressources to depend on |
152+
| <a name="output_talos_image_schematic_id"></a> [talos\_image\_schematic\_id](#output\_talos\_image\_schematic\_id) | ID of the Talos image schematic |
139153
| <a name="output_talosconfig"></a> [talosconfig](#output\_talosconfig) | Talos configuration file for the cluster |
140154

141155
## Repo Activity

examples/main.description

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
# terraform-proxmox-talos-cluster
22
A Terraform module for provisioning a Kubernetes cluster on Proxmox using Talos Linux. This module automates node creation, Talos configuration, and Proxmox integration, offering a secure, lightweight, and efficient environment for homelabs or production use. It simplifies the Kubernetes setup and management process.
33

4-
Feel free to contact me, open an issue, or contribute to the project. Your feedback and contributions are always welcome! 🤓
4+
Feel free to contact me, open an issue, or contribute to the project. Your feedback and contributions are always welcome! 🤓
5+
6+
## Geting kubeconfig & talosconfig
7+
```bash
8+
terraform output --raw kubeconfig > cluster.kubeconfig
9+
terraform output --raw talosconfig > cluster.talosconfig
10+
```
11+
12+
## Upgrading Talos cluster
13+
First we need get the schematic id from the outputs and use that for upgrading the cluster in order to keep the extensions.
14+
```bash
15+
talosctl upgrade --image factory.talos.dev/installer/<SCHEMATIC_ID>:v1.9.3 --preserve
16+
```
17+
The preserve option is only needed when wanting to keep files/directories on Talos nodes (for example when using Longhorn/Rook...)

outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,8 @@ output "talos_cluster_health" {
2020
description = "Health status of the Talos cluster, can be used for other ressources to depend on"
2121
value = data.talos_cluster_health.this
2222
}
23+
24+
output "talos_image_schematic_id" {
25+
description = "ID of the Talos image schematic"
26+
value = talos_image_factory_schematic.this.id
27+
}

0 commit comments

Comments
 (0)