-
Notifications
You must be signed in to change notification settings - Fork 7
/
main.tf
34 lines (34 loc) · 1.2 KB
/
main.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
provider "google" {
project = var.project
credentials = var.credentials
}
######################################################################
output "rs_ui_dns" {
value = ["https://node1.${var.yourname}-${var.env}.${var.dns_zone_dns_name}:8443",
"https://cluster.${var.yourname}-${var.env}.${var.dns_zone_dns_name}:8443"]
}
output "rs_ui_ip" {
value = "https://${google_compute_instance.node1.network_interface.0.access_config.0.nat_ip}:8443"
}
output "rs_cluster_dns" {
value = "cluster.${var.yourname}-${var.env}.${var.dns_zone_dns_name}"
}
output "nodes_ip" {
value = flatten([google_compute_instance.node1.network_interface.0.access_config.0.nat_ip , flatten([google_compute_instance.nodeX.*.network_interface.0.access_config.0.nat_ip])])
}
output "nodes_dns" {
value = flatten(google_dns_record_set.name_servers.rrdatas)
}
output "admin_username" {
value = var.RS_admin
}
output "admin_password" {
value = nonsensitive(random_password.password.result)
#sensitive = true
}
output "how_to_ssh" {
value = "gcloud compute ssh ${google_compute_instance.node1.name}"
}
output "how_to_ssh_to_app" {
value = var.app_enabled ? "gcloud compute ssh ${google_compute_instance.app.0.name}" : ""
}