Skip to content

Commit 8c1c0c6

Browse files
littlejoPhilipSchmid
authored andcommitted
Add output kubeconfig
1 parent 30b9a7a commit 8c1c0c6

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

00-outputs.tf

+5
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ output "cluster_name" {
1717
description = "Name of cluster"
1818
value = var.cluster_name
1919
}
20+
21+
output "kubeconfig" {
22+
description = "Kubeconfig content"
23+
value = data.talos_cluster_kubeconfig.this.kubeconfig_raw
24+
}

03-talos.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ resource "local_file" "kubeconfig" {
130130
filename = local.path_to_kubeconfig_file
131131
lifecycle {
132132
ignore_changes = [content]
133-
}
133+
}
134134
}
135135

136136
# Does currently not work because of the nodes reachability from the internet.

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ module "talos" {
122122
|------|-------------|
123123
| <a name="output_cluster_name"></a> [cluster\_name](#output\_cluster\_name) | Name of cluster |
124124
| <a name="output_elb_dns_name"></a> [elb\_dns\_name](#output\_elb\_dns\_name) | Public ELB DNS name. |
125+
| <a name="output_kubeconfig"></a> [kubeconfig](#output\_kubeconfig) | Kubeconfig content |
125126
| <a name="output_path_to_kubeconfig_file"></a> [path\_to\_kubeconfig\_file](#output\_path\_to\_kubeconfig\_file) | The generated kubeconfig. |
126127
| <a name="output_path_to_talosconfig_file"></a> [path\_to\_talosconfig\_file](#output\_path\_to\_talosconfig\_file) | The generated talosconfig. |
127128
<!-- END_TF_DOCS -->

0 commit comments

Comments
 (0)