|
| 1 | +variable "cluster_name" { |
| 2 | + description = "Name of the EKS cluster to attach the node group to." |
| 3 | + type = string |
| 4 | + nullable = false |
| 5 | +} |
| 6 | + |
| 7 | +variable "subnet_ids" { |
| 8 | + description = "List of subnet IDs for the node group." |
| 9 | + type = list(string) |
| 10 | + nullable = false |
| 11 | +} |
| 12 | + |
| 13 | +variable "node_group_name" { |
| 14 | + description = "Name of the node group." |
| 15 | + type = string |
| 16 | + nullable = false |
| 17 | +} |
| 18 | + |
| 19 | +variable "desired_size" { |
| 20 | + description = "Desired number of worker nodes." |
| 21 | + type = number |
| 22 | + default = 1 |
| 23 | + nullable = false |
| 24 | +} |
| 25 | + |
| 26 | +variable "min_size" { |
| 27 | + description = "Minimum number of worker nodes." |
| 28 | + type = number |
| 29 | + default = 1 |
| 30 | + nullable = false |
| 31 | +} |
| 32 | + |
| 33 | +variable "max_size" { |
| 34 | + description = "Maximum number of worker nodes." |
| 35 | + type = number |
| 36 | + default = 4 |
| 37 | + nullable = false |
| 38 | +} |
| 39 | + |
| 40 | +variable "instance_types" { |
| 41 | + description = <<EOF |
| 42 | +Instance types for worker nodes. |
| 43 | +
|
| 44 | +Recommended Configuration: |
| 45 | +- For other workloads: `r7g`, `r6g` families (ARM-based Graviton, without local disks) |
| 46 | +- For materialize instance workloads: `r6gd`, `r7gd` families (ARM-based Graviton, with local NVMe disks) |
| 47 | +- Enable disk setup when using instance types with local storage |
| 48 | +EOF |
| 49 | + type = list(string) |
| 50 | + nullable = false |
| 51 | +} |
| 52 | + |
| 53 | +variable "capacity_type" { |
| 54 | + description = "Capacity type for worker nodes (ON_DEMAND or SPOT)." |
| 55 | + type = string |
| 56 | + default = "ON_DEMAND" |
| 57 | + validation { |
| 58 | + condition = contains(["ON_DEMAND", "SPOT"], var.capacity_type) |
| 59 | + error_message = "Capacity type must be either ON_DEMAND or SPOT." |
| 60 | + } |
| 61 | +} |
| 62 | + |
| 63 | +variable "ami_type" { |
| 64 | + description = "AMI type for the node group." |
| 65 | + type = string |
| 66 | + default = "BOTTLEROCKET_ARM_64" |
| 67 | + nullable = false |
| 68 | +} |
| 69 | + |
| 70 | +variable "labels" { |
| 71 | + description = "Labels to apply to the node group." |
| 72 | + type = map(string) |
| 73 | + default = {} |
| 74 | +} |
| 75 | + |
| 76 | +variable "node_taints" { |
| 77 | + description = "Taints to apply to the node group." |
| 78 | + type = list(object({ |
| 79 | + key = string |
| 80 | + value = string |
| 81 | + effect = string |
| 82 | + })) |
| 83 | + default = [] |
| 84 | +} |
| 85 | + |
| 86 | +variable "tags" { |
| 87 | + description = "Tags to apply to all resources" |
| 88 | + type = map(string) |
| 89 | + default = {} |
| 90 | +} |
| 91 | + |
| 92 | +variable "swap_enabled" { |
| 93 | + description = "Whether to enable swap on the local NVMe disks." |
| 94 | + type = bool |
| 95 | + default = true |
| 96 | + nullable = false |
| 97 | +} |
| 98 | + |
| 99 | +variable "disk_setup_image" { |
| 100 | + description = "Docker image for the disk setup script" |
| 101 | + type = string |
| 102 | + default = "docker.io/materialize/ephemeral-storage-setup-image:v0.4.0" |
| 103 | + nullable = false |
| 104 | +} |
| 105 | + |
| 106 | +variable "cluster_service_cidr" { |
| 107 | + description = "The CIDR block for the cluster service" |
| 108 | + type = string |
| 109 | + nullable = false |
| 110 | +} |
| 111 | + |
| 112 | +variable "cluster_primary_security_group_id" { |
| 113 | + description = "The ID of the primary security group for the cluster" |
| 114 | + type = string |
| 115 | + nullable = false |
| 116 | +} |
| 117 | + |
| 118 | +variable "iam_role_use_name_prefix" { |
| 119 | + description = "Use name prefix for IAM roles" |
| 120 | + type = bool |
| 121 | + default = true |
| 122 | +} |
0 commit comments