-
Notifications
You must be signed in to change notification settings - Fork 20
/
outputs.tf
47 lines (41 loc) · 1.09 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
output "url" {
value = "https://${google_container_cluster.gke_cluster.endpoint}"
}
output "admin_username" {
value = "${var.master_username}"
}
output "admin_password" {
value = "${var.master_password}"
}
output "client_certificate" {
value = "${base64decode(google_container_cluster.gke_cluster.master_auth.0.client_certificate)}"
}
output "client_key" {
value = "${base64decode(google_container_cluster.gke_cluster.master_auth.0.client_key)}"
}
output "cluster_ca_certificate" {
value = "${base64decode(google_container_cluster.gke_cluster.master_auth.0.cluster_ca_certificate)}"
}
output "kube_config" {
value = <<EOT
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: ${google_container_cluster.gke_cluster.master_auth.0.cluster_ca_certificate}
server: https://${google_container_cluster.gke_cluster.endpoint}
name: kubernetes
contexts:
- context:
cluster: kubernetes
user: admin
name: context
current-context: context
kind: Config
preferences: {}
users:
- name: admin
user:
password: ${var.master_username}
username: ${var.master_password}
EOT
}