-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.tf
More file actions
90 lines (77 loc) · 2.47 KB
/
variables.tf
File metadata and controls
90 lines (77 loc) · 2.47 KB
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
variable "kubernetes_version" {
type = string
default = "1.35"
description = <<EOF
Desired Kubernetes master version.
If you do not specify a value, the latest available version at resource creation is used and no upgrades will occur except those automatically triggered by EKS.
The value must be configured and increased to upgrade the version when desired.
Downgrades are not supported by EKS.
EOF
validation {
condition = can(regex("^[0-9]+\\.[0-9]+$", var.kubernetes_version))
error_message = "kubernetes_version must be in the format 'MAJOR.MINOR' (e.g. '1.35')."
}
}
variable "log_retention_in_days" {
type = number
default = 365
description = <<EOF
This defines the retention period for the CloudWatch logs for this Kubernetes cluster.
EOF
validation {
condition = var.log_retention_in_days >= 1
error_message = "log_retention_in_days must be at least 1 day"
}
}
variable "node_instance_types" {
type = list(string)
default = ["t3.medium"]
description = <<EOF
List of EC2 instance types for the managed node group.
The first instance type in the list is used as the primary type.
EOF
}
variable "node_desired_size" {
type = number
default = 2
description = "Desired number of nodes in the managed node group."
validation {
condition = var.node_desired_size >= 1
error_message = "node_desired_size must be at least 1."
}
}
variable "node_min_size" {
type = number
default = 1
description = "Minimum number of nodes in the managed node group."
validation {
condition = var.node_min_size >= 1
error_message = "node_min_size must be at least 1."
}
}
variable "node_max_size" {
type = number
default = 5
description = "Maximum number of nodes in the managed node group."
validation {
condition = var.node_max_size >= 1
error_message = "node_max_size must be at least 1."
}
}
variable "node_disk_size" {
type = number
default = 20
description = "Disk size in GiB for each node in the managed node group."
validation {
condition = var.node_disk_size >= 20
error_message = "node_disk_size must be at least 20 GiB."
}
}
variable "node_ami_type" {
type = string
default = "AL2023_x86_64_STANDARD"
description = <<EOF
AMI type for the managed node group.
Valid values: AL2023_x86_64_STANDARD, AL2023_ARM_64_STANDARD, AL2_x86_64, AL2_ARM_64, BOTTLEROCKET_x86_64, BOTTLEROCKET_ARM_64.
EOF
}