-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.tf
55 lines (47 loc) · 1.48 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
provider "ddcloud" {
region = "AU"
}
#################
# Local variables
#
# Run setup.py to generate local-vars.json (where these values are supplied).
#
# variable "client_ip" { }
# variable "ssh_public_key_file" { }
# variable "ssh_bootstrap_password" { }
#########
# Globals
# Target datacenter
variable "datacenter" { default = "AU9" }
# Number of worker hosts
variable "worker_count" { default = 3 }
#########
# Network
variable "networkdomain_name" { default = "Rancher" }
variable "primary_network" { default = "10.0.12.0/24" }
#########
# Outputs
output "rancher_host" {
value = "${format("%s.%s.%s", ddcloud_server.rancher_host.name, var.dns_subdomain_name, var.dns_domain_name)}"
}
output "rancher_host_ip" {
value = "${ddcloud_nat.rancher_host.public_ipv4}"
}
output "rancher_host_node" {
value = "${format("%s.node.%s.%s", ddcloud_server.rancher_host.name, var.dns_subdomain_name, var.dns_domain_name)}"
}
output "rancher_host_node_ip" {
value = "${ddcloud_server.rancher_host.primary_adapter_ipv4}"
}
output "rancher_workers" {
value = [ "${formatlist("%s.%s.%s", ddcloud_server.worker.*.name, var.dns_subdomain_name, var.dns_domain_name)}" ]
}
output "worker_ips" {
value = [ "${ddcloud_nat.worker.*.public_ipv4}" ]
}
output "rancher_worker_nodes" {
value = [ "${formatlist("%s.node.%s.%s", ddcloud_server.worker.*.name, var.dns_subdomain_name, var.dns_domain_name)}" ]
}
output "worker_node_ips" {
value = [ "${ddcloud_server.worker.*.primary_adapter_ipv4}" ]
}