-
Notifications
You must be signed in to change notification settings - Fork 0
/
outputs.tf
56 lines (47 loc) · 1.71 KB
/
outputs.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
output "vm_ipv4_address_vms" {
description = "Retrieves IPv4 address for a k8s Talos cluster"
value = module.vms_proxmox.vm_ipv4_address_vms
}
output "config_ipv4_addresses" {
description = "Retrieves VM names with IPv4 address for a k8s Talos cluster"
value = module.vms_proxmox.config_ipv4_addresses
}
output "qemu_ipv4_addresses" {
description = "Retrieves VM names with IPv4 address for a k8s Talos cluster"
value = module.vms_proxmox.qemu_ipv4_addresses
}
output "kube_config" {
description = "Retrieves the kubeconfig for a k8s Talos cluster"
value = module.talos_k8s.kube_config.kubeconfig_raw
sensitive = true
}
output "talos_config" {
description = "Retrieves the talosconfig for a k8s Talos cluster"
value = module.talos_k8s.talos_config.talos_config
sensitive = true
}
resource "local_file" "talos_config" {
content = module.talos_k8s.talos_config.talos_config
filename = "output/talos-config.yaml"
file_permission = "0600"
}
resource "local_file" "kube_config" {
content = module.talos_k8s.kube_config.kubeconfig_raw
filename = "output/kube-config.yaml"
file_permission = "0600"
}
resource "local_file" "kube_config_home" {
content = module.talos_k8s.kube_config.kubeconfig_raw
filename = pathexpand("~/.kube/${var.cluster.name}.yaml")
file_permission = "0600"
}
resource "local_file" "talos_config_home" {
content = module.talos_k8s.talos_config.talos_config
filename = pathexpand("~/.talos/${var.cluster.name}.yaml")
file_permission = "0600"
}
output "cluster_name" {
description = "Retrieves the name for a k8s Talos cluster"
value = var.cluster.name
sensitive = false
}