forked from Capgemini/TerraKube-AWS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
339 lines (254 loc) · 7.96 KB
/
variables.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
### Provider
variable "adminregion" {
description = "The region to deploy the kubernetes cluster"
}
variable "adminprofile" {
description = "The local AWS-CLI profile to be used for AWS api credentials"
}
variable "key_name" {
description = "The name of the SSH key to be created in AWS for access to the bastion"
}
variable "public_key_path" {
description = "The path to the SSH key locally"
default = "~/.ssh/id_rsa.pub"
}
variable "bucketname" {
description = "The name of the S3 Bucket to store KMS encrypted TLS certs and Kube static pod manifests"
}
### Cluster specifications
variable "cluster-name" {
description = "The name of the Kubernetes cluster used in tags"
}
variable "cluster-domain" {
description = "The internal kubernetes cluster-domain"
default = "cluster.local"
}
variable "dns-service-ip" {
description = "The VIP (Virtual IP) address of the cluster DNS service"
default = "10.3.0.10"
}
variable "service-cluster-ip-range" {
description = "The CIDR network to use for service cluster VIPs (Virtual IPs)"
default = "10.3.0.0/24"
}
variable "k8s-service-ip" {
description = "The VIP (Virtual IP) address of the Kubernetes API Service. This must be set to the first IP in service-cluster range"
default = "10.3.0.1"
}
variable "kubernetes_image" {
description = "The docker kubernetes image we are using"
default = "quay.io/coreos/hyperkube:v1.5.2_coreos.0"
}
variable "pod-ip-range" {
description = "The CIDR network to use for pod IPs"
}
variable "placement_group" {
description = "Boolean value, set to true if wanting to host kubenodes in an AWS placement group for low inter-pod latency (nodes in same rack)"
default = "false"
}
# AMI info
variable "ownerid" {
description = "The AMI owner to be used for AMI lookup via data source"
default = "595879546273"
}
variable "ami_name" {
description = "The name of the AMI"
default = "CoreOS"
}
variable "channel" {
description = "The AMI release version e.g. Beta / Stable"
default = "Stable"
}
variable "virtualization_type" {
description = "The type of hypervisor used in AWS"
default = "HVM"
}
# Kubenode and bastion Autoscaling groups
variable "kubenode_ami_size" {
description = "The AMI size of the kubenode instances"
default = "t2.micro"
}
variable "kubenode_asg_name" {
description = "The name of the kubenodes autoscaling groups"
}
variable "kubenode_asg_number_of_instances" {
description = "The autoscaling groups normal number of instances of kubenodes"
}
variable "kubenode_asg_minimum_number_of_instances" {
description = "The autoscaling groups minimum number of instances of kubenodes"
}
variable "kubenode_asg_maximum_number_of_instances" {
description = "The autoscaling groups maximum number of instances of kubenodes"
}
variable "bastion_ami_size" {
description = "The AMI size of the kubenode instances"
default = "t2.micro"
}
variable "bastion_asg_name" {
description = "The name of the bastions autoscaling groups"
}
variable "bastion_asg_number_of_instances" {
description = "The autoscaling groups normal number of instances of bastions"
}
variable "bastion_asg_minimum_number_of_instances" {
description = "The autoscaling groups minimum number of instances of bastions"
}
variable "bastion_asg_maximum_number_of_instances" {
description = "The autoscaling groups maximum number of instances of bastions"
}
#### Kubenode and bastion modules
## Launch configs
variable "kubenode_lc_name" {
description = "The name of the kubenode launch config"
}
variable "bastion_lc_name" {
description = "The name of the etcd launch config"
}
###### Etcd module
## Launch config
variable "etcdlc_name" {
description = "The name of the etcd launch config"
}
## Autoscaling group
variable "etcd_ami_size" {
description = "The AMI size of the kubenode instances"
default = "t2.micro"
}
variable "etcd_nodes_az1" {
description = "The IPs of the ENIs smilodon attaches to the etcd nodes in AZ1"
type = "map"
}
variable "etcd_nodes_az2" {
description = "The IPs of the ENIs smilodon attaches to the etcd nodes in AZ2"
type = "map"
}
variable "etcd_nodes_az3" {
description = "The IPs of the ENIs smilodon attaches to the etcd nodes in AZ3"
type = "map"
}
variable "etcd_asg_name_az1" {
description = "The name of the etcd autoscaling group in AZ1"
}
variable "etcd_asg_maxsize_az1" {
description = "The autoscaling groups maximum etcd nodes in AZ1"
}
variable "etcd_asg_minsize_az1" {
description = "The autoscaling groups minimum etcd nodes in AZ1"
}
variable "etcd_asg_normsize_az1" {
description = "The autoscaling groups normal amount of etcd nodes in AZ1"
}
variable "etcd_asg_name_az2" {
description = "The name of the etcd autoscaling group in AZ2"
}
variable "etcd_asg_maxsize_az2" {
description = "The autoscaling groups maximum etcd nodes in AZ2"
}
variable "etcd_asg_minsize_az2" {
description = "The autoscaling groups maximum etcd nodes in AZ2"
}
variable "etcd_asg_normsize_az2" {
description = "The autoscaling groups normal amount of etcd nodes in AZ2"
}
variable "etcd_asg_name_az3" {
description = "The name of the etcd autoscaling group in AZ3"
}
variable "etcd_asg_maxsize_az3" {
description = "The autoscaling groups maximum etcd nodes in AZ3"
}
variable "etcd_asg_minsize_az3" {
description = "The autoscaling groups minumum etcd nodes in AZ3"
}
variable "etcd_asg_normsize_az3" {
description = "The autoscaling groups normal amount of etcd nodes in AZ3"
}
### VPC module
#VPC Networking
variable "vpc_cidr" {
description = "The VPC CIDR"
}
# 2 Private CIDRs
variable "private1_cidr" {
description = "The CIDR for private subnet 1"
}
variable "private2_cidr" {
description = "The CIDR for private subnet 2"
}
variable "private3_cidr" {
description = "The CIDR for private subnet 3"
}
# 2 Public CIDRs
variable "public1_cidr" {
description = "The CIDR for public subnet 1"
}
variable "public2_cidr" {
description = "The CIDR for public subnet 2"
}
variable "public3_cidr" {
description = "The CIDR for public subnet 3"
}
# Subnet Availability zones
variable "subnetaz1" {
description = "The Availability Zone for public and private subnet 1"
type = "map"
}
variable "subnetaz2" {
description = "The Availability Zone for public and private subnet 2"
type = "map"
}
variable "subnetaz3" {
description = "The Availability Zone for public and private subnet 3"
type = "map"
}
### security module
variable "iplock" {
description = "The CIDR to lock SSH access to via security groups"
}
### route53 module
variable "internal-tld" {
description = "The internal domain to be used in route53 Private Hosted Zone"
}
# names of the pem files generated defined when the module is called and the IP settings for CA
variable "capem" {
description = "The name of the CA cert generated"
}
variable "cakey" {
description = "The name of the CA private key generated"
}
variable "etcdpem" {
description = "The name of the etcd cert generated"
}
variable "etcdkey" {
description = "The name of the etcd private key generated"
}
variable "masterpem" {
description = "The name of the master cert generated"
}
variable "masterkey" {
description = "The name of the master private key generated"
}
variable "kubenodepem" {
description = "The name of the kubenode cert generated"
}
variable "kubenodekey" {
description = "The name of the kubenode private key generated"
}
variable "adminpem" {
description = "The name of the local administration cert generated"
}
variable "adminkey" {
description = "The name of the local administration private key generated"
}
variable "etcdproxypem" {
description = "The name of the etcdproxy cert generated"
}
variable "etcdproxykey" {
description = "The name of the etcdproxy private key generated"
}
## IAM module
variable "master_role_name" {
description = "The name of the kubemaster role"
}
variable "worker_role_name" {
description = "The name of the kubenode role"
}