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
variable "cluster_name" {
  description = "EKS cluster name to attach node groups to"
  type        = string
}

variable "node_groups" {
  description = "Map of managed node group definitions"
  type = map(object({
    name           = string
    subnet_ids     = list(string)
    instance_types = optional(list(string), ["m5.large"])
    ami_type       = optional(string, "AL2_x86_64")
    capacity_type  = optional(string, "ON_DEMAND")
    disk_size      = optional(number, 50)
    min_size       = optional(number, 1)
    max_size       = optional(number, 5)
    desired_size   = optional(number, 2)
    kms_key_arn    = optional(string, null)
    labels         = optional(map(string), {})
    taints = optional(list(object({
      key    = string
      value  = optional(string, null)
      effect = string
    })), [])
    max_unavailable = optional(number, 1)
  }))
  default = {}
}

variable "node_role_arn" {
  description = "ARN of the IAM role for worker nodes (created externally or via iam-role module)"
  type        = string
  default     = null
}

variable "create_node_role" {
  description = "Create a default node IAM role when node_role_arn is null"
  type        = bool
  default     = true
}

variable "tags" {
  description = "Resource tags to apply to all resources"
  type        = map(string)
  default     = {}
}