-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathvariables.tf
159 lines (134 loc) · 5.9 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
# -------------------------------------------------------------------------------------------------
# Enable/Disable
# -------------------------------------------------------------------------------------------------
variable "enable" {
description = "Whether or not to enable this module. This is required due to the lack of using count for modules. Set it to false to disable the creation of the ELB. Defaults to true"
default = true
}
# -------------------------------------------------------------------------------------------------
# Placement
# -------------------------------------------------------------------------------------------------
variable "vpc_id" {
description = "ID of the VPC to add this ELB to."
}
variable "subnet_ids" {
description = "List of subnet ids to place the ELB into."
type = "list"
}
# -------------------------------------------------------------------------------------------------
# Attachment (Optional)
# -------------------------------------------------------------------------------------------------
variable "asg_name" {
description = "Name of the auto scaling group to attach to. If this value is empty, no attachment will be done and is be left to the end-user via custom 'aws_autoscaling_group' or 'aws_autoscaling_attachment' definitions."
default = ""
}
# -------------------------------------------------------------------------------------------------
# Access
# -------------------------------------------------------------------------------------------------
variable "inbound_cidr_blocks" {
description = "List of CIDR's that are allowed to access the ELB."
type = "list"
}
# -------------------------------------------------------------------------------------------------
# ELB Settings (Optional)
# -------------------------------------------------------------------------------------------------
variable "internal" {
description = "If true, ELB will be an internal ELB."
default = false
}
variable "cross_zone_load_balancing" {
description = "Enable cross-zone load balancing."
default = true
}
variable "idle_timeout" {
description = "The time in seconds that the connection is allowed to be idle."
default = "60"
}
variable "connection_draining" {
description = "Boolean to enable connection draining."
default = false
}
variable "connection_draining_timeout" {
description = "The time in seconds to allow for connections to drain"
default = "300"
}
# -------------------------------------------------------------------------------------------------
# Listener
# -------------------------------------------------------------------------------------------------
variable "lb_port" {
description = "On what port do you want to access the ELB."
}
variable "instance_port" {
description = "On what port does the ELB access the instances."
}
# -------------------------------------------------------------------------------------------------
# Listener (Optional)
# -------------------------------------------------------------------------------------------------
variable "lb_protocol" {
description = "On what protocol should the load balancer respond."
default = "TCP"
}
variable "instance_protocol" {
description = "On what protocol does the instance respond."
default = "TCP"
}
# -------------------------------------------------------------------------------------------------
# Health Checks (Optional)
# -------------------------------------------------------------------------------------------------
variable "healthy_threshold" {
description = "The number of checks before the instance is declared healthy."
default = "10"
}
variable "unhealthy_threshold" {
description = "The number of checks before the instance is declared unhealthy."
default = "2"
}
variable "target" {
description = "The target of the check. If unset, will default to 'instance_protocol:instance_port' for TCP/SLL and 'instance_protocol:instance_port/' for HTTP/HTTPS."
default = ""
}
variable "interval" {
description = "The interval between checks."
default = "30"
}
variable "timeout" {
description = "The length of time before the check times out."
default = "5"
}
# -------------------------------------------------------------------------------------------------
# Naming/Tagging
# -------------------------------------------------------------------------------------------------
variable "name" {
description = "Name of the ELB and security group resources."
}
# -------------------------------------------------------------------------------------------------
# Naming/Tagging (Optional)
# -------------------------------------------------------------------------------------------------
variable "tags" {
description = "Tags to apply to all resources."
type = "map"
default = {}
}
variable "sg_name_suffix_elb" {
description = "Name suffix to append to the ELB security group."
default = "-elb"
}
# -------------------------------------------------------------------------------------------------
# DNS (Optional)
# -------------------------------------------------------------------------------------------------
variable "route53_public_dns_name" {
description = "If set, the ELB will be assigned this public DNS name via Route53."
default = ""
}
variable "route53_private_dns_name" {
description = "If set, the ELB will be assigned this private DNS name via Route53."
default = ""
}
variable "public_dns_evaluate_target_health" {
description = "Set to true if you want Route 53 to determine whether to respond to DNS queries using this resource record set by checking the health of the resource record set."
default = true
}
variable "private_dns_evaluate_target_health" {
description = "Set to true if you want Route 53 to determine whether to respond to DNS queries using this resource record set by checking the health of the resource record set."
default = true
}