-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
410 lines (332 loc) · 11.7 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
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
variable "master_ipv4_block" {
default = "172.16.0.16/28"
}
variable "private" {
type = bool
default = true
}
variable "name" {
}
variable "project_id" {
}
variable "cluster_autoscaling" {
type = object({
enabled = bool
autoscaling_profile = string
min_cpu_cores = number
max_cpu_cores = number
min_memory_gb = number
max_memory_gb = number
})
default = {
enabled = false
autoscaling_profile = "BALANCED"
max_cpu_cores = 0
min_cpu_cores = 0
max_memory_gb = 0
min_memory_gb = 0
}
description = "Cluster autoscaling configuration. See [more details](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters#clusterautoscaling)"
}
variable "node_preemptible" {
type = bool
default = false
}
variable "disable_legacy_metadata_endpoints" {
type = bool
description = "Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated."
default = true
}
variable "cluster_resource_labels" {
default = {}
}
variable "resource_usage_export_dataset_id" {
type = string
description = "The ID of a BigQuery Dataset for using BigQuery as the destination of resource usage export."
default = ""
}
variable "ingress_nginx_enabled" {
type = bool
description = "Enable ingress-nginx firewall rule (default: false)"
default = false
}
variable "region" {
}
variable "network_project_id" {
type = string
description = "The project ID of the shared VPC's host (for shared vpc support)"
default = ""
}
variable "kubernetes_version" {
type = string
description = "The Kubernetes version of the masters. If set to 'latest' it will pull latest available version in the selected region (default: 1.17)"
default = "1.19"
}
variable "master_authorized_networks" {
type = list(object({ cidr_block = string, display_name = string }))
description = "List of master authorized networks. If none are provided, disallow external access (except the cluster node IPs, which GKE automatically whitelists)."
default = []
}
variable "enable_network_egress_export" {
type = bool
description = "Whether to enable network egress metering for this cluster. If enabled, a daemonset will be created in the cluster to meter network egress traffic."
default = false
}
variable "enable_vertical_pod_autoscaling" {
type = bool
description = "Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it"
default = false
}
variable "enable_resource_consumption_export" {
type = bool
description = "Whether to enable resource consumption metering on this cluster. When enabled, a table will be created in the resource export BigQuery dataset to store resource consumption data. The resulting table can be joined with the resource usage table or with BigQuery billing export."
default = false
}
variable "zones" {
type = list(any)
description = "Zones where to spin the nodes."
}
variable "network_policy" {
type = bool
description = "Enable network policy addon."
default = true
}
variable "enable_private_endpoint" {
type = bool
description = "(Beta) Whether the master's internal IP address is used as the cluster endpoint."
default = false
}
variable "add_cluster_firewall_rules" {
type = bool
description = "Create additional firewall rules."
default = false
}
variable "firewall_priority" {
type = number
description = "Priority rule for firewall rules."
default = 1000
}
variable "firewall_inbound_ports" {
type = list(string)
description = "List of TCP ports for admission/webhook controllers."
default = ["8443", "9443", "15017"]
}
variable "gcloud_upgrade" {
type = bool
description = "Whether to upgrade gcloud at runtime."
default = false
}
variable "impersonate_service_account" {
type = string
description = "An optional service account to impersonate for gcloud commands. If this service account is not specified, the module will use Application Default Credentials."
default = ""
}
variable "network_policy_provider" {
type = string
description = "The network policy provider."
default = "CALICO"
}
variable "enable_binary_authorization" {
description = "Enable BinAuthZ Admission controller."
default = false
}
variable "enable_shielded_nodes" {
type = bool
description = "Enable Shielded Nodes features on all nodes in this cluster."
default = true
}
variable "authenticator_security_group" {
type = string
description = "The name of the RBAC security group for use with Google security groups in Kubernetes RBAC. Group name must be in format [email protected]."
}
variable "node_metadata" {
description = "Specifies how node metadata is exposed to the workload running on the node."
default = "GKE_METADATA_SERVER"
type = string
}
variable "database_encryption" {
description = "Application-layer Secrets Encryption settings. The object format is {state = string, key_name = string}. Valid values of state are: \"ENCRYPTED\"; \"DECRYPTED\". key_name is the name of a CloudKMS key."
type = list(object({ state = string, key_name = string }))
default = [{
state = "DECRYPTED"
key_name = ""
}]
}
variable "release_channel" {
type = string
description = "The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `REGULAR`."
default = "REGULAR"
}
variable "identity_namespace" {
description = "Workload Identity namespace. (Default value of `enabled` automatically sets project based namespace `[project_id].svc.id.goog`)."
type = string
default = "enabled"
}
variable "maintenance_start_time" {
type = string
description = "Time window specified for daily or recurring maintenance operations in RFC3339 format."
default = "05:00"
}
variable "maintenance_exclusions" {
type = list(object({ name = string, start_time = string, end_time = string }))
description = "List of maintenance exclusions. A cluster can have up to three."
default = []
}
variable "node_pools" {
default = []
}
variable "node_pools_labels" {
default = {}
}
variable "node_pools_taints" {
default = {}
}
variable "http_load_balancing" {
type = bool
description = "Enable httpload balancer addon."
default = true
}
variable "horizontal_pod_autoscaling" {
type = bool
description = "Enable horizontal pod autoscaling addon."
default = false
}
variable "node_auto_repair" {
type = bool
default = true
}
variable "node_auto_upgrade" {
default = true
}
variable "node_pools_name" {
default = "default-node-pool"
}
variable "machine_type" {
default = "n1-standard-2"
}
variable "disk_type" {
default = "pd-ssd"
}
variable "disk_size_gb" {
default = 30
}
variable "image_type" {
default = "COS"
}
variable "initial_node_count" {
default = 3
}
variable "node_min_count" {
default = 1
}
variable "node_max_count" {
default = 6
}
variable "regional" {
default = false
}
variable "remove_default_node_pool" {
type = bool
description = "Remove default node pool while setting up the cluster"
default = true
}
variable "ip_masq_resync_interval" {
type = string
description = "The interval at which the agent attempts to sync its ConfigMap file from the disk."
default = "60s"
}
variable "oauth_scopes" {
type = list(any)
default = [
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/logging.write",
"https://www.googleapis.com/auth/monitoring"
#"https://www.googleapis.com/auth/servicecontrol",
#"https://www.googleapis.com/auth/service.management.readonly",
#"https://www.googleapis.com/auth/trace.append",
]
}
variable "logging_service" {
type = string
description = "The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none"
default = "logging.googleapis.com/kubernetes"
}
variable "monitoring_service" {
type = string
description = "The monitoring service that the cluster should write metrics to. Automatically send metrics from pods in the cluster to the Google Cloud Monitoring API. VM metrics will be collected by Google Compute Engine regardless of this setting Available options include monitoring.googleapis.com, monitoring.googleapis.com/kubernetes (beta) and none"
default = "monitoring.googleapis.com/kubernetes"
}
variable "ip_masq_link_local" {
type = bool
description = "Whether to masquerade traffic to the link-local prefix (169.254.0.0/16)."
default = false
}
variable "configure_ip_masq" {
description = "Enables the installation of ip masquerading, which is usually no longer required when using aliasied IP addresses. IP masquerading uses a kubectl call, so when you have a private cluster, you will need access to the API server."
default = false
}
variable "outbound_access" {
type = bool
description = "When true, nodes have outbound_access internet access. It creates a NAT and a router to achieve that."
default = false
}
variable "create_service_account" {
type = bool
description = "Defines if service account specified to run nodes should be created."
default = true
}
variable "grant_registry_access" {
type = bool
description = "Grants created cluster-specific service account storage.objectViewer role."
default = false
}
variable "registry_project_ids" {
type = list(string)
description = "List of project IDs holding the Google Container Registry. If empty, we use the cluster project. If grant_registry_access is true, storage.objectViewer role is assigned on this project."
default = []
}
variable "service_account" {
type = string
description = "The service account to run nodes as if not overridden in `node_pools`. The create_service_account variable default value (true) will cause a cluster-specific service account to be created."
default = ""
}
variable "basic_auth_username" {
type = string
description = "The username to be used with Basic Authentication. An empty value will disable Basic Authentication, which is the recommended configuration."
default = ""
}
variable "basic_auth_password" {
type = string
description = "The password to be used with Basic Authentication."
default = ""
}
variable "issue_client_certificate" {
type = bool
description = "Issues a client certificate to authenticate to the cluster endpoint. To maximize the security of your cluster, leave this option disabled. Client certificates don't automatically rotate and aren't easily revocable. WARNING: changing this after cluster creation is destructive!"
default = false
}
variable "default_max_pods_per_node" {
description = "The maximum number of pods to schedule per node"
default = 110
}
variable "deploy_using_private_endpoint" {
type = bool
description = "(Beta) A toggle for Terraform and kubectl to connect to the master's internal IP address during deployment."
default = false
}
variable "enable_pod_security_policy" {
type = bool
description = "Enable the PodSecurityPolicy controller for this cluster. If enabled, pods must be valid under a PodSecurityPolicy to be created."
default = false
}
variable "http_public_ip_url" {
default = "https://ifconfig.me/"
}
variable "enable_integrity_monitoring" {
type = bool
default = true
}
variable "enable_secure_boot" {
type = bool
default = true
}