forked from inovex/kubernetes-on-openstack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
output.tf
28 lines (24 loc) · 853 Bytes
/
output.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
output "master_ip" {
value = "${openstack_networking_floatingip_v2.public_ip.address}"
}
data "template_file" "kubeconfig" {
template = "${file("${path.module}/templates/kubeconfig.tpl")}"
vars {
username = "${var.username}"
password = "${var.password}"
auth_url = "${var.auth_url}"
domain_name = "${var.domain_name}"
api_server_url = "https://${openstack_networking_floatingip_v2.public_ip.address}:6443"
cluster_name = "${var.cluster_name}"
auth_plugin = "${pathexpand("./bin/client-keystone-auth")}"
tenant_name = "${var.tenant_name}"
}
}
resource "local_file" "kubeconfig" {
content = "${data.template_file.kubeconfig.rendered}"
filename = "${path.module}/kubeconfig"
}
output "kubeconfig" {
sensitive = true
value = "${data.template_file.kubeconfig.rendered}"
}