-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
250 lines (207 loc) · 6.53 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
################################################################################
# Existing cluster
################################################################################
variable "use_existing_cluster" {
description = "Flag to reuse existing cluster"
default = false
type = bool
}
variable "name" {
description = "Name of the cluster. If use_existing_cluster is enabled name is used to fetch details of existing cluster"
type = string
}
################################################################################
# Cluster
################################################################################
variable "kubernetes_version" {
description = "Version of the kubernetes engine"
default = "1.30"
type = string
}
variable "orchestrator_version" {
description = "Kubernetes version for the orchestration layer (nodes). By default it will be derived with var.kubernetes_version until passed explicitly"
type = string
default = "1.30"
}
variable "log_analytics_workspace_enabled" {
description = "value to enable log analytics workspace"
type = bool
default = true
}
variable "oidc_issuer_enabled" {
description = "Enable OIDC for the cluster"
default = true
type = bool
}
variable "disk_size" {
description = "Disk size of the initial node pool in GB"
default = "100"
type = string
}
variable "sku_tier" {
description = "SKU tier of the cluster. Defaults to standard"
default = "Standard"
type = string
}
################################################################################
# Initial Nodepool configurations
################################################################################
variable "initial_node_pool_name" {
description = "Name of the initial node pool"
default = "initial"
type = string
}
variable "intial_node_pool_instance_type" {
description = "Instance size of the initial node pool"
default = "Standard_D2s_v5"
type = string
}
variable "initial_node_pool_max_surge" {
description = "Max surge in percentage for the intial node pool"
type = string
default = "10"
}
variable "initial_node_pool_max_count" {
description = "Max count in the initial node pool"
type = number
default = 2
}
variable "initial_node_pool_min_count" {
description = "Min count in the initial node pool"
type = number
default = 1
}
################################################################################
# CPU pool configurations
################################################################################
variable "cpu_pools" {
description = "CPU pools to be attached"
type = list(object({
name = string
instance_type = string
min_count = optional(number, 0)
max_count = optional(number, 2)
enable_spot_pool = optional(bool, true)
enable_on_demand_pool = optional(bool, true)
}))
}
################################################################################
# GPU pool configurations
################################################################################
variable "gpu_pools" {
description = "GPU pools to be attached"
type = list(object({
name = string
instance_type = string
min_count = optional(number, 0)
max_count = optional(number, 2)
enable_spot_pool = optional(bool, true)
enable_on_demand_pool = optional(bool, true)
}))
}
variable "workload_identity_enabled" {
description = "Enable workload identity in the cluster"
default = true
type = bool
}
variable "control_plane" {
description = "Whether the cluster is control plane"
type = bool
}
variable "control_plane_instance_type" {
description = "Whether the cluster is control plane"
default = "Standard_D2s_v5"
type = string
}
variable "enable_storage_profile" {
description = "Enable storage profile for the cluster. If disabled `enable_blob_driver`, `enable_file_driver`, `enable_disk_driver` and `enable_snapshot_controller` will have no impact"
type = bool
default = true
}
variable "enable_blob_driver" {
description = "Enable blob storage provider"
type = bool
default = true
}
variable "enable_file_driver" {
description = "Enable file storage provider"
type = bool
default = true
}
variable "enable_disk_driver" {
description = "Enable disk storage provider"
type = bool
default = true
}
variable "disk_driver_version" {
description = "Version of disk driver. Supported values `v1` and `v2`"
type = string
default = "v1"
}
variable "enable_snapshot_controller" {
description = "Enable snapshot controller"
type = bool
default = true
}
variable "max_pods_per_node" {
description = "Max pods per node"
type = number
default = 32
}
################################################################################
# Network
################################################################################
variable "vnet_id" {
description = "Vnet ID for the cluster"
type = string
}
variable "subnet_id" {
description = "Subnet Id for the cluster"
type = string
}
variable "network_plugin" {
description = "Network plugin to use for cluster"
type = string
default = "kubenet"
}
variable "pod_cidr" {
description = "CIDR of the pod in cluster"
default = "10.244.0.0/16"
type = string
}
variable "service_cidr" {
description = "CIDR of the services in cluster"
default = "10.255.0.0/16"
type = string
}
variable "dns_ip" {
description = "IP from service CIDR used for internal DNS"
default = "10.255.0.10"
type = string
}
variable "allowed_ip_ranges" {
description = "Allowed IP ranges to connect to the cluster"
default = ["0.0.0.0/0"]
type = list(string)
}
variable "private_cluster_enabled" {
description = "Private cluster"
default = false
type = bool
}
################################################################################
# Generic
################################################################################
variable "resource_group_name" {
description = "Name of the resource group"
type = string
}
variable "location" {
description = "Location of the resource group"
type = string
}
variable "tags" {
description = "A map of tags to add to all resources"
type = map(string)
default = {}
}