-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
370 lines (337 loc) · 9.09 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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
variable "tenancy_ocid" {}
variable "user_ocid" {}
variable "fingerprint" {}
variable "private_key_path" {}
variable "compartment_ocid" {
description = "Compartment resources will be placed in."
}
variable "iac_tooling" {
description = "Value used to identify the tooling used to generate this providers infrastructure."
type = string
default = "terraform"
}
variable "prefix" {
description = "A prefix used in the name for all the OCI resources created by this script. The prefix string must start with lowercase letter and contain only alphanumeric characters and hyphen or dash(-), but can not start or end with '-'."
type = string
default = "viya"
validation {
condition = can(regex("^[a-z][-0-9a-zA-Z]*[0-9a-zA-Z]$", var.prefix)) && length(var.prefix) > 2 && length(var.prefix) < 21
error_message = "ERROR: Value of 'prefix'\n * must contain at least one alphanumeric character and at most 20 characters\n * can only contain letters, numbers, and hyphen or dash(-), but can't start or end with '-'."
}
}
variable "region" {
description = "The OCI Region to provision all resources in this script"
default = "us-ashburn-1"
}
variable "availability_domain" {
description = "The OCI regional Availability Domain to provision all resources in this script. 1, 2, or 3"
default = 1
}
variable "network_strategy_enum" {
type = map
default = {
CREATE_NEW_VCN_SUBNET = "Create New VCN and Subnet"
USE_EXISTING_VCN_SUBNET = "Use Existing VCN and Subnet"
}
}
variable "network_strategy" {
#default = "Use Existing VCN and Subnet"
default = "Create New VCN and Subnet"
}
#
# If deployiing into an existing network set 4 vars below
#
variable "vcn_id" {
default = ""
}
variable "public_subnet_id" {
default = ""
}
variable "private_subnet_id" {
default = ""
}
variable "nat_gateway_ip" {
default = ""
}
#########
variable "ssh_public_key" {
type = string
}
variable "node_vm_admin" {
description = "OS Admin User for VMs of OKE Cluster nodes"
default = "opc"
}
variable "default_nodepool_vm_type" {
default = "VM.Standard.E4.Flex" # default 8 ocpu
}
variable "default_flex_shape_ocpus" {
default = "8"
}
variable "kubernetes_version" {
description = "The OKE cluster K8s version"
default = "v1.22.5"
}
variable "default_public_access_cidrs" {
description = "List of CIDRs to access created resources"
type = list(string)
default = null
}
variable "cluster_endpoint_public_access_cidrs" {
description = "List of CIDRs to access Kubernetes cluster"
type = list(string)
default = null
}
variable "vm_public_access_cidrs" {
description = "List of CIDRs to access jump or nfs VM"
type = list(string)
default = ["0.0.0.0/0"]
}
variable "default_nodepool_auto_scaling" {
description = "Autoscale nodes in the AKS cluster default nodepool"
default = true
}
variable "default_nodepool_max_nodes" {
description = "(Required, when default_nodepool_auto_scaling=true) The maximum number of nodes which should exist in this Node Pool. If specified this must be between 1 and 100."
default = 5
}
variable "default_nodepool_min_nodes" {
description = "(Required, when default_nodepool_auto_scaling=true) The minimum number of nodes which should exist in this Node Pool. If specified this must be between 1 and 100."
default = 1
}
variable "default_nodepool_node_count" {
description = "The initial number of nodes which should exist in this Node Pool. If specified this must be between 1 and 100 and between `default_nodepool_min_nodes` and `default_nodepool_max_nodes`."
default = 1
}
variable "default_nodepool_os_disk_size" {
description = "(Optional) The size of the OS Disk which should be used for each agent in the Node Pool. Changing this forces a new resource to be created."
default = 128
}
variable "default_nodepool_max_pods" {
description = "(Optional) The maximum number of pods that can run on each agent. Changing this forces a new resource to be created."
default = 110
}
variable "default_nodepool_taints" {
type = list(any)
default = []
}
variable "default_nodepool_labels" {
type = map(any)
default = {}
}
variable "default_nodepool_availability_zones" {
type = list(any)
default = []
}
variable "tags" {
description = "Map of common tags to be placed on the Resources"
type = map(any)
default = null
}
variable "defined_tags" {
description = "Map of common tags to be placed on the Resources"
type = map(any)
default = null
}
# CAS Nodepool config
variable "create_cas_nodepool" {
description = "Create the CAS Node Pool"
type = bool
default = true
}
variable "cas_nodepool_vm_type" {
default = "VM.Standard.E4.Flex" # default 8 ocpu
}
variable "cas_nodepool_os_disk_size" {
default = 200
}
variable "cas_nodepool_node_count" {
default = 1
}
variable "cas_nodepool_auto_scaling" {
default = true
}
variable "cas_nodepool_max_nodes" {
default = 5
}
variable "cas_nodepool_min_nodes" {
default = 1
}
variable "cas_nodepool_taints" {
type = list(any)
default = ["workload.sas.com/class=cas:NoSchedule"]
}
variable "cas_nodepool_labels" {
type = map(any)
default = {
"workload.sas.com/class" = "cas"
}
}
variable "cas_nodepool_availability_zones" {
type = list(any)
default = []
}
# Compute Nodepool config
variable "create_compute_nodepool" {
description = "Create the Compute Node Pool"
type = bool
default = true
}
variable "compute_nodepool_vm_type" {
default = "VM.Standard.E4.Flex" # default 8 ocpu
}
variable "compute_nodepool_os_disk_size" {
default = 200
}
variable "compute_nodepool_node_count" {
default = 1
}
variable "compute_nodepool_auto_scaling" {
default = true
}
variable "compute_nodepool_max_nodes" {
default = 5
}
variable "compute_nodepool_min_nodes" {
default = 1
}
variable "compute_nodepool_taints" {
type = list(any)
default = ["workload.sas.com/class=compute:NoSchedule"]
}
variable "compute_nodepool_labels" {
type = map(any)
default = {
"workload.sas.com/class" = "compute"
"launcher.sas.com/prepullImage" = "sas-programming-environment"
}
}
variable "compute_nodepool_availability_zones" {
type = list(any)
default = []
}
# Connect Nodepool config
variable "create_connect_nodepool" {
description = "Create the Connect Node Pool"
type = bool
default = true
}
variable "connect_nodepool_vm_type" {
default = "VM.Standard.E4.Flex" # default 8 ocpu
}
variable "connect_nodepool_os_disk_size" {
default = 200
}
variable "connect_nodepool_node_count" {
default = 1
}
variable "connect_nodepool_auto_scaling" {
default = true
}
variable "connect_nodepool_max_nodes" {
default = 5
}
variable "connect_nodepool_min_nodes" {
default = 1
}
variable "connect_nodepool_taints" {
type = list(any)
default = ["workload.sas.com/class=connect:NoSchedule"]
}
variable "connect_nodepool_labels" {
type = map(any)
default = {
"workload.sas.com/class" = "connect"
"launcher.sas.com/prepullImage" = "sas-programming-environment"
}
}
variable "connect_nodepool_availability_zones" {
type = list(any)
default = []
}
# Stateless Nodepool config
variable "create_stateless_nodepool" {
description = "Create the Stateless Node Pool"
type = bool
default = true
}
variable "stateless_nodepool_vm_type" {
default = "VM.Standard.E4.Flex" # default 8 ocpu
}
variable "stateless_nodepool_os_disk_size" {
default = 200
}
variable "stateless_nodepool_node_count" {
default = 1
}
variable "stateless_nodepool_auto_scaling" {
default = true
}
variable "stateless_nodepool_max_nodes" {
default = 5
}
variable "stateless_nodepool_min_nodes" {
default = 1
}
variable "stateless_nodepool_taints" {
type = list(any)
default = ["workload.sas.com/class=stateless:NoSchedule"]
}
variable "stateless_nodepool_labels" {
type = map(any)
default = {
"workload.sas.com/class" = "stateless"
}
}
variable "stateless_nodepool_availability_zones" {
type = list(any)
default = []
}
# Stateful Nodepool config
variable "create_stateful_nodepool" {
description = "Create the Stateful Node Pool"
type = bool
default = true
}
variable "stateful_nodepool_vm_type" {
default = "VM.Standard.E4.Flex" # default 8 ocpu
}
variable "stateful_nodepool_os_disk_size" {
default = 200
}
variable "stateful_nodepool_node_count" {
default = 1
}
variable "stateful_nodepool_auto_scaling" {
default = true
}
variable "stateful_nodepool_max_nodes" {
default = 3
}
variable "stateful_nodepool_min_nodes" {
default = 1
}
variable "stateful_nodepool_taints" {
type = list(any)
default = ["workload.sas.com/class=stateful:NoSchedule"]
}
variable "stateful_nodepool_labels" {
type = map(any)
default = {
"workload.sas.com/class" = "stateful"
}
}
variable "stateful_nodepool_availability_zones" {
type = list(any)
default = []
}
variable "create_jump_vm" {
description = "Create bastion host VM"
default = null
}
variable "create_jump_public_ip" {
default = true
}
variable "jump_vm_admin" {
description = "OS Admin User for Jump VM"
default = "jumpuser"
}