-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvariables.tf
267 lines (223 loc) · 7.5 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
################################################################################
# General
################################################################################
variable "name" {
description = "The resource name of the load balancer."
type = string
default = "scaleway-lb-module"
}
variable "description" {
description = "Define a description for the Load balancer"
type = string
default = null
}
variable "tags" {
description = "A list of tags to add to all resources"
type = list(string)
default = []
}
variable "zone" {
description = "Load balancer zone"
type = string
default = "fr-par-1"
}
################################################################################
# Load balancer
################################################################################
variable "load_balancer_name" {
description = "The resource name of the load balancer."
type = string
default = ""
}
variable "load_balancer_tags" {
description = "Additional tags for the VPC"
type = list(string)
default = []
}
variable "timeouts" {
description = "Define maximum timeout for creating, updating, and deleting load balancer resources"
type = map(string)
default = {}
}
variable "ssl_compatibility_level" {
description = "Determines the minimal SSL version which needs to be supported on client side."
type = string
default = "ssl_compatibility_level_modern"
}
variable "load_balancer_type" {
description = "The type of load balancer to create. Possible types: lb-s, lb-gp-m, lb-gp-l, lb-gp-xl"
type = string
default = "LB-S"
}
variable "private_network_configs" {
description = "List of private networks configurations"
type = list(object({
private_network = object({
id = string
dhcp_enabled = bool
static_ips = list(string)
})
}))
default = []
}
################################################################################
# Routes
################################################################################
variable "create_routes" {
description = "Determines if route should be created"
type = bool
default = false
}
variable "load_balancer_route_host_header" {
description = "A list of maps describing the load balancer routes. Optional match_sni, match_host_header. Conditions must be based on SNI for direction to TCP backends, or HTTP host headers for direction to HTTP backends. Use the routes endpoint to create, edit, list, get and delete your routes."
type = any
default = []
}
################################################################################
# Backend
################################################################################
variable "backend_name" {
description = "The backend name of the load balancer."
type = string
default = null
}
variable "backend_forward_protocol" {
description = "Protocol to be used on load balancer backend resource"
type = string
default = "tcp"
}
variable "backend_forward_port" {
description = "Port to be used on load balancer backend resource as forward port"
type = number
default = 80
}
variable "backend_ip_addresses" {
description = "Backend server IP addresses list (IPv4 or IPv6)"
default = []
type = list(string)
}
variable "backend_sticky_sessions" {
description = "The type of sticky session"
default = null
type = string
}
variable "backend_sticky_sessions_cookie_name" {
description = "Cookie name for for sticky sessions"
default = null
type = string
}
variable "backend_port_algorithm" {
description = "Load balancing algorithm"
default = "roundrobin"
type = string
}
variable "backend_timeout_server" {
description = "Define maximum timeout for server"
type = string
default = "1s"
}
variable "backend_timeout_connect" {
description = "Define maximum timeout for server"
type = string
default = "2.5s"
}
variable "backend_timeout_tunnel" {
description = "Define maximum timeout for tunnel"
type = string
default = "3s"
}
variable "backend_timeout_health_check" {
description = "Define maximum health check"
type = string
default = "30s"
}
variable "backend_failover_host" {
description = "Scaleway S3 bucket website to be served in case all backend servers are down"
type = string
default = null
}
variable "backend_health_check_max_retries" {
description = "Number of allowed failed HC requests before the backend server is marked down"
type = number
default = 2
}
variable "backend_health_check_delay" {
description = "Define maximum health check"
type = string
default = "1m0s"
}
variable "backend_marked_down_action" {
description = "Modify what occurs when a backend server is marked down"
type = string
default = "none"
}
variable "backend_ssl_bridging" {
description = "Enables SSL between load balancer and backend servers"
type = bool
default = false
}
variable "backend_ignore_ssl_server_verify" {
description = "Specifies whether the Load Balancer should check the backend server’s certificate before initiating a connection"
type = bool
default = false
}
variable "backend_health_check_port" {
default = 80
type = number
description = "The port to use when connecting to a backend server to forward a user session"
}
variable "backend_proxy_protocol" {
default = "none"
type = string
description = "Type of PROXY protocol to enable"
}
variable "load_balancer_backend_health_check_https" {
type = object({
uri = string
code = number
method = string
host_header = string
sni = string
})
default = null
description = "An object describing the Health check method for this LB. Required key/values: type: https. Required: uri Optional: code, sni. (default to load_balancer_backend_health_check_https[count.index]"
}
################################################################################
# Frontend
################################################################################
variable "frontend_name" {
default = ""
type = string
description = "Name to be used on load balancer frontend resource as identifier"
}
variable "frontend_inbound_port" {
default = 443
type = number
description = "Port to be used on load balancer frontend resource as inbound port"
}
variable "frontend_timeout_client" {
default = "30s"
type = string
description = "Defines maximum allowed inactivity time on the client side"
}
################################################################################
# Certificate
################################################################################
variable "certificate_ids" {
description = "Certificate IDs list"
default = null
type = list(string)
}
###############################################################################
# ACLs
###############################################################################
variable "create_acls" {
description = "Controls if the Load Balancer ACl Rules should be created"
type = bool
default = true
}
variable "load_balancer_action_rules" {
description = "A list of maps describing the ACL Rules for this LB. Required key/values: actions, rules. (default to load_balancer_action_rules[count.index])"
type = any
default = []
}