-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutputs.tf
56 lines (45 loc) · 1.61 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
# TKEs
output "cluster_id" {
value = tencentcloud_kubernetes_cluster.cluster.id
description = "TKE cluster id."
}
output "cluster_domain" {
value = tencentcloud_kubernetes_cluster.cluster.domain
description = "Cluster domain."
}
output "cluster_endpoint" {
value = tencentcloud_kubernetes_cluster.cluster.cluster_external_endpoint
description = "Cluster endpoint if cluster_public_access enabled"
}
output "cluster_intranet_endpoint" {
value = tencentcloud_kubernetes_cluster.cluster.pgw_endpoint
description = "Cluster endpoint if cluster_private_access enabled"
}
locals {
kube_config_raw = tencentcloud_kubernetes_cluster.cluster.kube_config
kube_config = yamldecode(local.kube_config_raw)
}
output "kube_config_raw" {
value = local.kube_config_raw
description = "TKE cluster's kube config in raw."
}
output "kube_config" {
value = local.kube_config
description = "YAML decoded TKE cluster's kube config."
}
output "intranet_kube_config" {
value = tencentcloud_kubernetes_cluster.cluster.kube_config_intranet
description = "Cluster's kube config of private access."
}
output "cluster_ca_certificate" {
value = tencentcloud_kubernetes_cluster.cluster.certification_authority
description = "Cluster's certification authority."
}
output "client_key" {
value = local.kube_config.users[0].user["client-key-data"]
description = "Base64 encoded cluster's client pem key."
}
output "client_certificate" {
value = local.kube_config.users[0].user["client-certificate-data"]
description = "Base64 encoded cluster's client pem certificate."
}