forked from cloudposse/terraform-aws-eks-node-group
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
139 lines (116 loc) · 4.83 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
variable "enable_cluster_autoscaler" {
type = bool
description = "Whether to enable node group to scale the Auto Scaling Group"
default = false
}
variable "cluster_name" {
type = string
description = "The name of the EKS cluster"
}
variable "ec2_ssh_key" {
type = string
description = "SSH key name that should be used to access the worker nodes"
default = null
}
variable "desired_size" {
type = number
description = "Desired number of worker nodes (external changes ignored)"
}
variable "max_size" {
type = number
description = "Maximum number of worker nodes"
}
variable "min_size" {
type = number
description = "Minimum number of worker nodes"
}
variable "subnet_ids" {
description = "A list of subnet IDs to launch resources in"
type = list(string)
}
variable "existing_workers_role_policy_arns" {
type = list(string)
default = []
description = "List of existing policy ARNs that will be attached to the workers default role on creation"
}
variable "existing_workers_role_policy_arns_count" {
type = number
default = 0
description = "Count of existing policy ARNs that will be attached to the workers default role on creation. Needed to prevent Terraform error `count can't be computed`"
}
variable "ami_type" {
type = string
description = "Type of Amazon Machine Image (AMI) associated with the EKS Node Group. Defaults to `AL2_x86_64`. Valid values: `AL2_x86_64`, `AL2_x86_64_GPU`. Terraform will only perform drift detection if a configuration value is provided"
default = "AL2_x86_64"
}
variable "disk_size" {
type = number
description = "Disk size in GiB for worker nodes. Defaults to 20. Terraform will only perform drift detection if a configuration value is provided"
default = 20
}
variable "instance_types" {
type = list(string)
description = "Set of instance types associated with the EKS Node Group. Defaults to [\"t3.medium\"]. Terraform will only perform drift detection if a configuration value is provided"
default = ["t3.medium"]
validation {
condition = (
length(var.instance_types) == 1
)
error_message = "Per the EKS API, only a single instance type value is currently supported."
}
}
variable "kubernetes_labels" {
type = map(string)
description = "Key-value mapping of Kubernetes labels. Only labels that are applied with the EKS API are managed by this argument. Other Kubernetes labels applied to the EKS Node Group will not be managed"
default = {}
}
variable "ami_release_version" {
type = string
description = "AMI version of the EKS Node Group. Defaults to latest version for Kubernetes version"
default = null
}
variable "kubernetes_version" {
type = string
description = "Kubernetes version. Defaults to EKS Cluster Kubernetes version. Terraform will only perform drift detection if a configuration value is provided"
default = null
}
variable "source_security_group_ids" {
type = list(string)
default = []
description = "Set of EC2 Security Group IDs to allow SSH access (port 22) from on the worker nodes. If you specify `ec2_ssh_key`, but do not specify this configuration when you create an EKS Node Group, port 22 on the worker nodes is opened to the Internet (0.0.0.0/0)"
}
variable "module_depends_on" {
type = any
default = null
description = "Can be any value desired. Module will wait for this value to be computed before creating node group."
}
variable "launch_template_id" {
type = string
description = "The ID of a custom launch template to use for the EKS node group."
default = null
}
variable "launch_template_version" {
type = string
description = "A specific version of the above specific launch template"
default = null
}
variable "bootstrap_extra_args" {
type = string
default = ""
description = "Extra arguments to the `bootstrap.sh` script to enable `--enable-docker-bridge` or `--use-max-pods`"
}
variable "kubelet_extra_args" {
type = string
default = ""
description = "Extra arguments to pass to kubelet, like \"--register-with-taints=dedicated=ci-cd:NoSchedule --node-labels=purpose=ci-worker\""
}
variable "before_cluster_joining_userdata" {
type = string
default = ""
description = "Additional commands to execute on each worker node before joining the EKS cluster (before executing the `bootstrap.sh` script). For more info, see https://kubedex.com/90-days-of-aws-eks-in-production"
}
variable "after_cluster_joining_userdata" {
type = string
default = ""
description = "Additional commands to execute on each worker node after joining the EKS cluster (after executing the `bootstrap.sh` script). For more info, see https://kubedex.com/90-days-of-aws-eks-in-production"
}