forked from poseidon/terraform-render-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutputs.tf
74 lines (56 loc) · 1.8 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
output "id" {
value = "${sha1("${template_dir.bootstrap-manifests.id} ${local_file.kubeconfig.id}")}"
}
output "content_hash" {
value = "${sha1("${template_dir.bootstrap-manifests.id} ${template_dir.manifests.id}")}"
}
// Deprecated
output "kube_dns_service_ip" {
value = "${cidrhost(var.service_cidr, 10)}"
}
output "cluster_dns_service_ip" {
value = "${cidrhost(var.service_cidr, 10)}"
}
output "kubeconfig" {
value = "${data.template_file.kubeconfig.rendered}"
}
output "user-kubeconfig" {
value = "${data.template_file.user-kubeconfig.rendered}"
}
# etcd TLS assets
output "etcd_ca_cert" {
value = "${tls_self_signed_cert.etcd-ca.cert_pem}"
}
output "etcd_client_cert" {
value = "${tls_locally_signed_cert.client.cert_pem}"
}
output "etcd_client_key" {
value = "${tls_private_key.client.private_key_pem}"
}
output "etcd_server_cert" {
value = "${tls_locally_signed_cert.server.cert_pem}"
}
output "etcd_server_key" {
value = "${tls_private_key.server.private_key_pem}"
}
output "etcd_peer_cert" {
value = "${tls_locally_signed_cert.peer.cert_pem}"
}
output "etcd_peer_key" {
value = "${tls_private_key.peer.private_key_pem}"
}
# Some platforms may need to reconstruct the kubeconfig directly in user-data.
# That can't be done with the way template_file interpolates multi-line
# contents so the raw components of the kubeconfig may be needed.
output "ca_cert" {
value = "${base64encode(var.ca_certificate == "" ? join(" ", tls_self_signed_cert.kube-ca.*.cert_pem) : var.ca_certificate)}"
}
output "kubelet_cert" {
value = "${base64encode(tls_locally_signed_cert.kubelet.cert_pem)}"
}
output "kubelet_key" {
value = "${base64encode(tls_private_key.kubelet.private_key_pem)}"
}
output "server" {
value = "${format("https://%s:%s", element(var.api_servers, 0), var.apiserver_port)}"
}