-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvar.tf
185 lines (173 loc) · 3.54 KB
/
var.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
# YC account
variable "token" {
type = string
description = "OAuth-token; https://cloud.yandex.ru/docs/iam/concepts/authorization/oauth-token"
}
variable "cloud_id" {
type = string
description = "https://cloud.yandex.ru/docs/resource-manager/operations/cloud/get-id"
}
variable "folder_id" {
type = string
description = "https://cloud.yandex.ru/docs/resource-manager/operations/folder/get-id"
}
# YC zones
variable "default_region" {
type = string
default = "ru-central1"
}
variable "vms_zone" {
type = string
default = "standard-v1"
}
variable "default_zone" {
type = string
default = "ru-central1-a"
}
# VPC
variable "network_name" {
type = string
default = "network"
}
variable "public" {
type = map(any)
default = {
sub-a = {
name = "public-a"
zone = "ru-central1-a"
cidr = "10.0.1.0/24"
}
sub-b = {
name = "public-b"
zone = "ru-central1-b"
cidr = "10.0.2.0/24"
}
sub-d = {
name = "public-d"
zone = "ru-central1-d"
cidr = "10.0.3.0/24"
}
}
}
# Ig VM
variable "ig_vm" {
type = list(object({
name = string,
p_id = string,
cpu = number,
ram = number,
disk = number,
cf = number,
type = string,
nat = bool,
sched_pol = bool,
fix_size = number,
dep_un = number,
dep_create = number,
dep_exp = number,
dep_del = number
}))
default = [
{
name = "master"
p_id = "standard-v2"
cpu = 2
ram = 4
disk = 20
cf = 5
type = "network-ssd"
nat = true
sched_pol = true
fix_size = 3
dep_un = 3
dep_create = 3
dep_exp = 3
dep_del = 3
},
{
name = "worker"
p_id = "standard-v2"
cpu = 2
ram = 2
disk = 20
cf = 5
type = "network-hdd"
nat = true
sched_pol = true
fix_size = 2
dep_un = 2
dep_create = 2
dep_exp = 2
dep_del = 2
},
{
name = "ingress"
p_id = "standard-v2"
cpu = 2
ram = 2
disk = 20
cf = 5
type = "network-hdd"
nat = true
sched_pol = true
fix_size = 2
dep_un = 2
dep_create = 2
dep_exp = 2
dep_del = 2
}
]
description = "ig resources"
}
variable "vm_family" {
type = string
default = "ubuntu-2004-lts"
description = "yandex_compute_image_family"
}
# NLB set
variable "nlb_set" {
type = list(object({
nlb_name = string,
app_list_name = string,
app_port = number,
app_tport = number,
mon_list_name = string,
mon_port = number,
mon_tport = number,
hc_name = string
}))
default = [
{
nlb_name = "nlb-app"
app_list_name = "listener-app"
app_port = 80
app_tport = 30001
mon_list_name = "listener-grafana"
mon_port = 3000
mon_tport = 30000
hc_name = "tcp"
}
]
description = "nlb settings"
}
# RS set
variable "rs" {
type = list(object({
name = string,
type = string,
ttl = number
}))
default = [
{
name = "app.bosone.ru."
type = "A"
ttl = 200
}
]
description = "rs settings"
}
variable "bosone_id" {
type = string
default = "dns7l9gn3jfmq8psoskj"
description = "bosone.ru."
}