-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.tf
More file actions
154 lines (124 loc) · 2.83 KB
/
variables.tf
File metadata and controls
154 lines (124 loc) · 2.83 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
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
variable "domain_name" {
description = "Desired DNS domain of the cluster"
default = "eks-1.dev.superhub.io"
type = string
}
variable "name" {
description = "Desired DNS name of the cluster"
type = string
}
variable "k8s_version" {
description = "Kubernetes version"
type = string
default = "1.21"
}
variable "base_domain" {
description = "DNS base domain"
type = string
}
variable "cluster_name" {
default = "eks-1"
type = string
}
variable "eks_admin" {
default = ""
type = string
}
variable "keypair" {
default = ""
type = string
}
variable "key_arn" {
default = ""
type = string
}
variable "cidr_block" {
default = "10.0.0.0/16"
type = string
}
variable "n_zones" {
default = "2"
type = string
}
variable "availability_zone" {
default = ""
type = string
}
variable "availability_zones" {
default = ""
type = string
}
variable "worker_labels" {
type = string
default = ""
description = "Kubernetes worker node labels"
}
variable "worker_bootstrap" {
type = string
default = ""
description = "VM userdata to run commands prior to node Kubernetes bootstrap"
}
variable "worker_instance_type" {
default = "r5.large"
type = string
}
variable "worker_count" {
default = "2"
type = string
}
variable "worker_max_count" {
default = "2"
type = string
}
variable "worker_spot_price" {
default = ""
type = string
}
variable "worker_root_volume_type" {
type = string
default = "gp3"
description = "The type of volume for the root block device of worker nodes."
}
variable "worker_root_volume_size" {
type = string
default = "50"
description = "The size of the volume in gigabytes for the root block device of worker nodes."
}
variable "worker_root_volume_iops" {
type = string
default = "100"
description = <<EOF
The amount of provisioned IOPS for the root block device of worker nodes.
Ignored if the volume type is not io1.
EOF
}
# AWS defaults below
# https://www.terraform.io/docs/providers/aws/r/autoscaling_group.html#mixed_instances_policy-instances_distribution
# https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstancesDistribution.html
variable "on_demand_base_capacity" {
type = string
default = "0"
}
variable "on_demand_percentage_above_base_capacity" {
type = string
default = "0" # the default is 100, yet we want spot instances thus 0
}
variable "spot_allocation_strategy" {
type = string
default = "capacity-optimized"
}
variable "spot_instance_pools" {
type = string
default = "2"
}
variable "external_aws_access_key_id" {
type = string
default = ""
}
variable "external_aws_secret_access_key" {
type = string
default = ""
}
locals {
name2 = replace(var.domain_name, ".", "-")
}