-
Notifications
You must be signed in to change notification settings - Fork 3
/
variables.tf
66 lines (57 loc) · 2.44 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
variable "start_module" {
description = "Used to start operation of module (actually to create route-switcher timer trigger)"
type = bool
default = false
}
variable "folder_id" {
description = "Folder id for route-switcher infrastructure"
type = string
default = null
}
variable "route_table_folder_list" {
description = "List of folders id with route tables protected by route-switcher"
type = list(string)
default = []
}
variable "route_table_list" {
description = "List of route tables id which are protected by route-switcher"
type = list(string)
default = []
}
variable "router_healthcheck_port" {
description = "Healthchecked tcp port of routers"
type = number
default = null
}
variable "back_to_primary" {
description = "Back to primary router after its recovery"
type = bool
default = true
}
variable "routers" {
description = "List of routers. For each router specify its healtchecked ip address with subnet, list of router interfaces with ip addresses used as next hops in route tables and corresponding backup peer router ip adresses."
type = list(object({
healthchecked_ip = string # ip address which will be checked by NLB to obtain router status. Usually located in management network.
healthchecked_subnet_id = string # subnet id of healthchecked ip address
interfaces = list(object({
own_ip = string # ip address of router interface
backup_peer_ip = string # ip address of backup router, which will be used to switch next hop for a static route in case of a router failure
}))
}))
default = []
}
variable "route_switcher_sa_roles" {
description = "Roles that are needed for route-switcher service account"
type = list(string)
default = ["load-balancer.privateAdmin", "serverless.functions.invoker", "storage.editor", "monitoring.editor"]
}
variable "cron_interval" {
description = "Interval in minutes for launching route-switcher function. If changing default value manually change cron_expression value in route_switcher_trigger accordingly to specified interval."
type = number
default = 1
}
variable "router_healthcheck_interval" {
description = "Interval in seconds for checking routers status using NLB healthcheck. Changing interval to value lower than 10 sec is not recommended. If changing default values additional test is recommended for failure scenarios."
type = number
default = 60
}