-
Notifications
You must be signed in to change notification settings - Fork 145
/
io.tf
83 lines (80 loc) · 2.17 KB
/
io.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
provider "aws" { region = "${ var.aws["region"] }" }
# variables
variable "aws" {
default = {
account-id = ""
azs = ""
key-name = ""
region = ""
}
}
variable "cidr" {
default = {
allow-ssh = "0.0.0.0/0"
pods = "10.2.0.0/16"
service-cluster = "10.3.0.0/24"
vpc = "10.0.0.0/16"
}
}
variable "cluster-domain" { default = "cluster.local" }
variable "coreos-aws" {
default = {
ami = ""
channel = ""
type = ""
}
}
variable "dns-service-ip" { default = "10.3.0.10" }
variable "etcd-ips" { default = "10.0.10.10,10.0.10.11,10.0.10.12" }
variable "instance-type" {
default = {
bastion = "t2.nano"
pki = "t2.nano"
etcd = "m3.large"
worker = "m3.large"
}
}
variable "internal-tld" {}
variable "k8s" {
default = {
hyperkube-image = "quay.io/coreos/hyperkube"
hyperkube-tag = "v1.5.1_coreos.0"
}
}
variable "k8s-service-ip" { default = "10.3.0.1" }
variable "name" {}
variable "pki-ip" {}
variable "s3-bucket" {}
variable "vpc-existing" {
default = {
id = ""
gateway-id = ""
subnet-ids-public = ""
subnet-ids-private = ""
}
}
# outputs
output "azs" { value = "${ var.aws["azs"] }" }
output "bastion-ip" { value = "${ module.bastion.ip }" }
output "cluster-domain" { value = "${ var.cluster-domain }" }
output "dns-service-ip" { value = "${ var.dns-service-ip }" }
output "etcd1-ip" { value = "${ element( split(",", var.etcd-ips), 0 ) }" }
output "external-elb" { value = "${ module.etcd.external-elb }" }
output "internal-tld" { value = "${ var.internal-tld }" }
output "name" { value = "${ var.name }" }
output "pki-ip" { value = "${ module.pki.ip }" }
output "region" { value = "${ var.aws["region"] }" }
output "s3-bucket" { value = "${ module.s3.bucket }" }
output "subnet-ids-private" { value = "${ module.vpc.subnet-ids-private }" }
output "subnet-ids-public" { value = "${ module.vpc.subnet-ids-public }" }
output "worker-autoscaling-group-name" { value = "${ module.worker.autoscaling-group-name }" }
output "ips" {
value = "${
map(
"bastion", "${ module.bastion.ip }",
"dns-service", "${ var.dns-service-ip }",
"etcd", "${ var.etcd-ips }",
"pki", "${ module.pki.ip }",
)
}"
}