Skip to content

Commit

Permalink
Add output kubeconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
littlejo committed Jun 10, 2024
1 parent 2e805aa commit d4e12bd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions 00-outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ output "cluster_name" {
description = "Name of cluster"
value = var.cluster_name
}

output "kubeconfig" {
description = "Kubeconfig content"
value = data.talos_cluster_kubeconfig.this.kubeconfig_raw
}
2 changes: 1 addition & 1 deletion 03-talos.tf
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ resource "local_file" "kubeconfig" {
filename = local.path_to_kubeconfig_file
lifecycle {
ignore_changes = [content]
}
}
}

# Does currently not work because of the nodes reachability from the internet.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ module "talos" {
|------|-------------|
| <a name="output_cluster_name"></a> [cluster\_name](#output\_cluster\_name) | Name of cluster |
| <a name="output_elb_dns_name"></a> [elb\_dns\_name](#output\_elb\_dns\_name) | Public ELB DNS name. |
| <a name="output_kubeconfig"></a> [kubeconfig](#output\_kubeconfig) | Kubeconfig content |
| <a name="output_path_to_kubeconfig_file"></a> [path\_to\_kubeconfig\_file](#output\_path\_to\_kubeconfig\_file) | The generated kubeconfig. |
| <a name="output_path_to_talosconfig_file"></a> [path\_to\_talosconfig\_file](#output\_path\_to\_talosconfig\_file) | The generated talosconfig. |
<!-- END_TF_DOCS -->

0 comments on commit d4e12bd

Please sign in to comment.