-
Notifications
You must be signed in to change notification settings - Fork 82
/
variables.tf
455 lines (380 loc) · 11.3 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
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
# Generic variables
variable "region" {
description = "Region code"
type = string
default = "us-east-1"
}
# VPC variables
variable "vpc_name" {
description = "Name of the VPC"
type = string
default = "dev-vpc"
}
variable "vpc_cidr" {
description = "VPC CIDR range"
type = string
default = "10.0.0.0/16"
}
variable "vpc_azs" {
description = "List of AZs"
type = list(string)
default = ["us-east-1a", "us-east-1b", "us-east-1c"]
}
variable "vpc_public_subnets" {
description = "List of public subnet CIDR ranges"
type = list(string)
default = ["10.0.11.0/24", "10.0.12.0/24", "10.0.13.0/24"]
}
variable "vpc_private_subnets" {
description = "List of private subnet CIDR ranges"
type = list(string)
default = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
}
variable "vpc_database_subnets" {
description = "List of database subnet CIDR ranges"
type = list(string)
default = ["10.0.21.0/24", "10.0.22.0/24", "10.0.23.0/24"]
}
variable "vpc_tags" {
description = "Tags to apply to vpc peering for api x data vpc"
type = map(string)
default = { "Name" = "dev-vpc", "created-by" = "terraform" }
}
# ASG variables
variable "asg_sg_name" {
description = "Name of the autoscaling group security group"
type = string
default = "dev-asg-sg"
}
variable "asg_sg_description" {
description = "Description of the autoscaling group security group"
type = string
default = "dev-asg-sg"
}
variable "asg_sg_tags" {
description = "Tags for autoscaling group security group"
type = map(string)
default = { "Name" = "dev-asg-sg", "created-by" = "terraform" }
}
variable "asg_name" {
description = "Name of the autoscaling group"
type = string
default = "dev-asg"
}
variable "asg_min_size" {
description = "Auto scaling minimum size"
type = number
default = 0
}
variable "asg_max_size" {
description = "Auto scaling maximum size"
type = number
default = 1
}
variable "asg_desired_capacity" {
description = "Auto scaling desired capacity"
type = number
default = 1
}
variable "asg_wait_for_capacity_timeout" {
description = "Auto scaling wait for capacity timeout"
type = number
default = 0
}
variable "asg_health_check_type" {
description = "Auto scaling health check type"
type = string
default = "EC2"
}
variable "asg_launch_template_name" {
description = "Name of the autoscaling group launch template"
type = string
default = "dev-lt"
}
variable "asg_launch_template_description" {
description = "Description of the autoscaling group security group"
type = string
default = "dev-lt"
}
variable "asg_update_default_version" {
description = "Auto scaling group update default version"
type = bool
default = true
}
variable "asg_image_id" {
description = "Auto scaling group image id"
type = string
default = "ami-026b57f3c383c2eec"
}
variable "asg_instance_type" {
description = "Auto scaling group instance type"
type = string
default = "t3.micro"
}
variable "asg_ebs_optimized" {
description = "Auto scaling group ebs optimized"
type = bool
default = true
}
variable "asg_enable_monitoring" {
description = "Auto scaling group enable monitoring"
type = bool
default = true
}
variable "asg_create_iam_instance_profile" {
description = "Auto scaling group create iam instance profile"
type = bool
default = true
}
variable "asg_iam_role_name" {
description = "Auto scaling group iam role name"
type = string
default = "dev-asg-iam-role"
}
variable "asg_iam_role_path" {
description = "Auto scaling group iam role path"
type = string
default = "/ec2/"
}
variable "asg_iam_role_description" {
description = "Auto scaling group iam role description"
type = string
default = "dev-asg-iam-role"
}
variable "asg_iam_role_tags" {
description = "Auto scaling group iam role tags"
type = map(string)
default = { "Name" = "dev-asg-iam-role", "created-by" = "terraform" }
}
variable "asg_block_device_mappings_volume_size_0" {
description = "Auto scaling group block device mapping volume size 0"
type = number
default = 20
}
variable "asg_block_device_mappings_volume_size_1" {
description = "Auto scaling group block device mapping volume size 1"
type = number
default = 30
}
variable "asg_instance_tags" {
description = "Auto scaling group instance tags"
type = map(string)
default = { "Name" = "dev-asg-instance", "created-by" = "terraform" }
}
variable "asg_volume_tags" {
description = "Auto scaling group volume tags"
type = map(string)
default = { "Name" = "dev-asg-volume", "created-by" = "terraform" }
}
variable "asg_tags" {
description = "Auto scaling group tags"
type = map(string)
default = { "Name" = "dev-asg", "created-by" = "terraform" }
}
# ALB variables
variable "alb_sg_name" {
description = "Application load balancer security group name"
type = string
default = "dev-alb-sg"
}
variable "alb_sg_ingress_cidr_blocks" {
description = "Application load balancer cidr blocks"
type = list(any)
default = ["0.0.0.0/0"]
}
variable "alb_sg_description" {
description = "Application load balancer security group description"
type = string
default = "dev-alb-sg"
}
variable "alb_sg_tags" {
description = "Application load balancer security group tags"
type = map(string)
default = { "Name" = "dev-alb-sg", "created-by" = "terraform" }
}
variable "alb_description" {
description = "Application load balancer description"
type = string
default = "dev-alb"
}
variable "alb_name" {
description = "Application load balancer name"
type = string
default = "dev-alb"
}
variable "alb_http_tcp_listeners_port" {
description = "Application load balancer http listeners port"
type = number
default = 80
}
variable "alb_target_group_name" {
description = "Application load balancer target group name"
type = string
default = "dev-alb-tg"
}
variable "alb_target_groups_backend_port" {
description = "Application load balancer http listeners port"
type = number
default = 80
}
variable "alb_tags" {
description = "Application load balancer tags"
type = map(string)
default = { "Name" = "dev-alb", "created-by" = "terraform" }
}
# RDS variables
variable "rds_sg_name" {
description = "Relational database service security group name"
type = string
default = "dev-rds-sg"
}
variable "rds_sg_description" {
description = "Relational database service security group description"
type = string
default = "dev-rds-sg"
}
variable "rds_sg_tags" {
description = "Relational database service security group tags"
type = map(string)
default = { "Name" = "dev-rds-sg", "created-by" = "terraform" }
}
variable "rds_identifier" {
description = "Relational database service identifier"
type = string
default = "dev-rds"
}
variable "rds_mysql_engine" {
description = "Relational database service mysql engine"
type = string
default = "mysql"
}
variable "rds_engine_version" {
description = "Relational database service mysql engine version"
type = string
default = "8.0.27"
}
variable "rds_family" {
description = "Relational database service family"
type = string
default = "mysql8.0"
}
variable "rds_major_engine_version" {
description = "Relational database service major engine version"
type = string
default = "8.0"
}
variable "rds_instance_class" {
description = "Relational database service instance class"
type = string
default = "db.t2.small"
}
variable "rds_allocated_storage" {
description = "Relational database service allocated storage"
type = number
default = 20
}
variable "rds_max_allocated_storage" {
description = "Relational database service max allocated storage"
type = number
default = 100
}
variable "rds_db_name" {
description = "Relational database service db name"
type = string
default = "dev_mysql"
}
variable "rds_username" {
description = "Relational database service username"
type = string
default = "dev_user"
}
variable "rds_port" {
description = "Relational database service port"
type = number
default = 3306
}
variable "rds_multi_az" {
description = "Relational database service multi az"
type = bool
default = false
}
variable "rds_maintenance_window" {
description = "Relational database service maintenance window"
type = string
default = "Mon:00:00-Mon:03:00"
}
variable "rds_backup_window" {
description = "Relational database service backup window"
type = string
default = "03:00-06:00"
}
variable "rds_enabled_cloudwatch_logs_exports" {
description = "Relational database service enabled cloudwatch log exports"
type = list(any)
default = ["general"]
}
variable "rds_create_cloudwatch_log_group" {
description = "Relational database service create cloudwatch log group"
type = bool
default = true
}
variable "rds_backup_retention_period" {
description = "Relational database service backup retention period"
type = number
default = 0
}
variable "rds_skip_final_snapshot" {
description = "Relational database service skip final snapshot"
type = bool
default = true
}
variable "rds_deletion_protection" {
description = "Relational database service deletion protection"
type = bool
default = false
}
variable "rds_performance_insights_enabled" {
description = "Relational database service insights enabled"
type = bool
default = false
}
variable "rds_performance_insights_retention_period" {
description = "Relational database service retention period"
type = number
default = 7
}
variable "rds_create_monitoring_role" {
description = "Relational database service create monitoring role"
type = bool
default = true
}
variable "rds_monitoring_interval" {
description = "Relational database service monitoring interval"
type = number
default = 60
}
variable "rds_tags" {
description = "Relational database service tags"
type = map(string)
default = { "Name" = "dev-rds", "created-by" = "terraform" }
}
variable "rds_db_instance_tags" {
description = "Relational database service db instance tags"
type = map(string)
default = { "Name" = "dev-rds", "created-by" = "terraform" }
}
variable "rds_db_option_group_tags" {
description = "Relational database service db option group tags"
type = map(string)
default = { "Name" = "dev-rds", "created-by" = "terraform" }
}
variable "rds_db_parameter_group_tags" {
description = "Relational database service db parameter group tags"
type = map(string)
default = { "Name" = "dev-rds", "created-by" = "terraform" }
}
variable "rds_db_subnet_group_tags" {
description = "Relational database service db subnet group tags"
type = map(string)
default = { "Name" = "dev-rds", "created-by" = "terraform" }
}