-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables-provider.tf
92 lines (80 loc) · 2.18 KB
/
variables-provider.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
## Provider specific variables
## Copy to toplevel
variable "region" {
description = "Provider Region"
type = string
default = null
}
variable "vpc_id" {
description = "Provider VPC ID. Example: vpc-xxxxxxxxxxxxxxxxx"
type = string
}
variable "subnet_ids" {
description = "Provider VPC subnet IDs. Applies to all node_groups by default. Example: [\"subnet-xxxxxxxxxxxxxxxxx\",\"subnet-yyyyyyyyyyyyyyyyy\"]"
type = list(string)
}
#############################
## Node Groups
#############################
variable "node_groups_defaults" {
description = "Provider default node_groups definition"
type = any
default = {
instance_types = ["m5.xlarge"]
desired_capacity = 1
min_capacity = 1
max_capacity = 1
disk_size = 50
additional_tags = {}
# To use kubelet_extra_args you must set create_launch_template=true.
# kubelet_extra_args : "--max-pods=110"
# create_launch_template: true
}
validation {
condition = length(var.node_groups_defaults.instance_types) > 0
error_message = "Missing instance_types[]. Ex: [\"m5.xlarge\"]."
}
}
variable "node_groups" {
description = "Provider node_groups definition"
type = any
default = {
"infra" : {
"min_capacity" : 2
"max_capacity" : 2
"k8s_labels" : {
"role" : "infra"
}
"taints" : [
{
"key" : "dedicated"
"value" : "infra"
"effect" : "NO_SCHEDULE"
}
]
# To use kubelet_extra_args you must set create_launch_template=true.
# kubelet_extra_args : "--max-pods=110"
# create_launch_template: true
}
"app" : {
"min_capacity" : 2
"max_capacity" : 4
"k8s_labels" : {
"role" : "app"
}
# To use kubelet_extra_args you must set create_launch_template=true.
# kubelet_extra_args : "--max-pods=110"
# create_launch_template: true
}
}
}
variable "tags" {
description = "A map of tags to add to all resources"
type = any
default = {}
}
variable "cluster_tags" {
description = "A map of additional tags to add to the cluster"
type = any
default = {}
}