-
Notifications
You must be signed in to change notification settings - Fork 1
/
variables.tf
120 lines (107 loc) · 2.57 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
#
# yandex cloud coordinates
#
variable "region_id" {
description = "ID of the availability zone where the network load balancer resides"
type = string
default = null
}
#
# naming
#
variable "name" {
description = "Network load balancer name"
type = string
}
variable "description" {
description = "Network load balancer description"
type = string
default = ""
}
variable "labels" {
description = "A set of labels"
type = map(string)
default = {}
}
#
# network
#
variable "subnet_id" {
description = "Private subnet where IP for NLB listener will be allocated"
type = string
default = null
}
variable "create_pip" {
description = "If true, public IP will be created"
type = bool
default = true
}
variable "pip_zone_id" {
description = "Public IP zone"
type = string
default = "ru-central1-a"
}
#
# load balancer configuration
#
variable "type" {
description = "Network load balancer type; Can be internal or external"
type = string
default = "internal"
}
variable "listeners" {
description = "Network load balancer listeners"
type = list(object({
name = optional(string)
port = optional(number)
target_port = optional(number)
protocol = optional(string, "tcp")
is_public = optional(bool, false)
ip_version = optional(string, "ipv4")
}))
default = []
}
variable "target_group_ids" {
description = "IDs of target groups that will be attached to Network Load Balancer"
type = list(string)
default = []
}
variable "create_target_group" {
description = "If true, target group will be created"
type = bool
default = false
}
variable "targets" {
description = "Network load balancer targets"
type = list(object({
address = string
subnet_id = string
}))
default = []
}
variable "health_check" {
description = "Target group health check"
type = object({
enabled = optional(bool, false)
name = string
interval = optional(number, 2)
timeout = optional(number, 1)
unhealthy_threshold = optional(number, 2)
healthy_threshold = optional(number, 3)
http_options = optional(object({
port = optional(number)
path = optional(string, "/")
}), null)
tcp_options = optional(object({
port = optional(number)
}), null)
})
default = {
name = "app"
}
}
variable "pip" {
description = "Public IP address for the network load balancer"
type = string
default = null
}