forked from aws-solutions-library-samples/guidance-for-game-server-hosting-using-agones-and-open-match-on-amazon-eks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.tf
More file actions
300 lines (250 loc) · 9.04 KB
/
variables.tf
File metadata and controls
300 lines (250 loc) · 9.04 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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
## Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
## SPDX-License-Identifier: MIT-0
variable "cluster_name" {
type = string
}
# Example: "us-east-1"
# No default is set because this one module is replicated across multiple regions in the Terraform template.
# If the default value is used then it might conflict with the default value of the other Kubernetes Cluster in the other region
variable "cluster_region" {
type = string
}
# Example: 10.0.0.0/16
# No default is set because this one module is replicated across multiple regions in the Terraform template.
# If the default value is used then it might conflict with the default value of the other Kubernetes Cluster in the other region
variable "cluster_cidr" {
type = string
}
variable "cluster_version" {
type = string
default = "1.32"
}
# Variable for ensuring that all available Managed Node Groups (MNGs) use arm-based instances
# This value must be set to false if the deployer wishes to use a combination of x86 and arm-based MNGs in the EKS Cluster
variable "all_mngs_use_arm_based_instance_types" {
type = bool
default = false
}
# Variable for ensuring that nodes in the gamerservers Managed Node Group (MNG) use arm-based instances
# See ./main.tf to see all of the available MNGs in the cluster
variable "gameservers_mng_uses_arm_based_instances" {
type = bool
default = false
}
# Default is an m5.large instance type: 2 vCPU, 8 GB Memory, EBS-Only Instance Storage, 10 Gbps Network Bandwidth, 4750 Mbps EBS Bandwidth
# Ensure that all instance types have the same specifications (same cpu and memory amounts) for proper scheduling and scaling
variable "gameservers_x86_instance_types" {
type = list(any)
default = ["m5.large"]
}
# Default is an m7g.large instance type: 2 vCPU, 8 GB Memory, EBS-Only Instance Storage, 12.5 Gbps Network Bandwidth, 10 Gbps EBS Bandwidth
# Ensure that all instance types have the same specifications (same cpu and memory amounts) for proper scheduling and scaling
variable "gameservers_arm_instance_types" {
type = list(any)
default = ["m7g.large"]
}
variable "gameservers_x86_based_ami_type" {
type = string
default = "AL2_x86_64"
}
variable "gameservers_arm_based_ami_type" {
type = string
default = "AL2_ARM_64"
}
variable "gameservers_min_size" {
type = number
default = 1
}
variable "gameservers_max_size" {
type = number
default = 6
}
variable "gameservers_desired_size" {
type = number
default = 3
}
# Variable for ensuring that nodes in the agones system Managed Node Group (MNG) use arm-based instances
# See ./main.tf to see all of the available MNGs in the cluster
variable "agones_system_mng_uses_arm_based_instances" {
type = bool
default = false
}
# Default is an m5.large instance type: 2 vCPU, 8 GB Memory, EBS-Only Instance Storage, 10 Gbps Network Bandwidth, 4750 Mbps EBS Bandwidth
# Ensure that all instance types have the same specifications (same cpu and memory amounts) for proper scheduling and scaling
variable "agones_system_x86_instance_types" {
type = list(any)
default = ["m5.large"]
}
# Default is an m7g.large instance type: 2 vCPU, 8 GB Memory, EBS-Only Instance Storage, 12.5 Gbps Network Bandwidth, 10 Gbps EBS Bandwidth
# Ensure that all instance types have the same specifications (same cpu and memory amounts) for proper scheduling and scaling
variable "agones_system_arm_instance_types" {
type = list(any)
default = ["m7g.large"]
}
variable "agones_system_x86_based_ami_type" {
type = string
default = "AL2_x86_64"
}
variable "agones_system_arm_based_ami_type" {
type = string
default = "AL2_ARM_64"
}
# Minimum must be at least 3 for multiple agones system pods unless you increase the ebs volume size per node
variable "agones_system_min_size" {
type = number
default = 3
}
variable "agones_system_max_size" {
type = number
default = 6
}
variable "agones_system_desired_size" {
type = number
default = 3
}
# This variable currently is not used during cluster creation
variable "agones_system_ebs_size" {
type = number
default = 50
}
# Variable for ensuring that nodes in the agones metrics Managed Node Group (MNG) use arm-based instances
# See ./main.tf to see all of the available MNGs in the cluster
variable "agones_metrics_mng_uses_arm_based_instances" {
type = bool
default = false
}
# Default is an m5.large instance type: 2 vCPU, 8 GB Memory, EBS-Only Instance Storage, 10 Gbps Network Bandwidth, 4750 Mbps EBS Bandwidth
# Ensure that all instance types have the same specifications (same cpu and memory amounts) for proper scheduling and scaling
variable "agones_metrics_x86_instance_types" {
type = list(any)
default = ["m5.large"]
}
# Default is an m7g.large instance type: 2 vCPU, 8 GB Memory, EBS-Only Instance Storage, 12.5 Gbps Network Bandwidth, 10 Gbps EBS Bandwidth
# Ensure that all instance types have the same specifications (same cpu and memory amounts) for proper scheduling and scaling
variable "agones_metrics_arm_instance_types" {
type = list(any)
default = ["m7g.large"]
}
variable "agones_metrics_x86_based_ami_type" {
type = string
default = "AL2_x86_64"
}
variable "agones_metrics_arm_based_ami_type" {
type = string
default = "AL2_ARM_64"
}
variable "agones_metrics_min_size" {
type = number
default = 1
}
variable "agones_metrics_max_size" {
type = number
default = 3
}
variable "agones_metrics_desired_size" {
type = number
default = 1
}
# Variable for ensuring that nodes in the openmatch Managed Node Group (MNG) use arm-based instances
# See ./main.tf to see all of the available MNGs in the cluster
# AS OF 8-21-2024, OPENMATCH DOES NOT SUPPORT ARM-BASED ARCHITECTURES
# variable "open_match_mng_uses_arm_based_instances" {
# type = bool
# default = false
# }
# Default is an m5.large instance type: 2 vCPU, 8 GB Memory, EBS-Only Instance Storage, 10 Gbps Network Bandwidth, 4750 Mbps EBS Bandwidth
# Ensure that all instance types have the same specifications (same cpu and memory amounts) for proper scheduling and scaling
variable "open_match_x86_instance_types" {
type = list(any)
default = ["m5.large"]
}
# Default is an m7g.large instance type: 2 vCPU, 8 GB Memory, EBS-Only Instance Storage, 12.5 Gbps Network Bandwidth, 10 Gbps EBS Bandwidth
# Ensure that all instance types have the same specifications (same cpu and memory amounts) for proper scheduling and scaling
# AS OF 8-21-2024, OPENMATCH DOES NOT SUPPORT ARM-BASED ARCHITECTURES
# variable "open_match_arm_instance_types" {
# type = list(any)
# default = ["m7g.large"]
# }
variable "open_match_x86_based_ami_type" {
type = string
default = "AL2_x86_64"
}
# AS OF 8-21-2024, OPENMATCH DOES NOT SUPPORT ARM-BASED ARCHITECTURES
# variable "open_match_arm_based_ami_type" {
# type = string
# default = "AL2_ARM_64"
# }
variable "open_match_min_size" {
type = number
default = 1
}
variable "open_match_max_size" {
type = number
default = 6
}
variable "open_match_desired_size" {
type = number
default = 3
}
# Variable for ensuring that nodes in the agones-openmatch Managed Node Group (MNG) use arm-based instances
# See ./main.tf to see all of the available MNGs in the cluster
# AS OF 8-21-2024, OPENMATCH DOES NOT SUPPORT ARM-BASED ARCHITECTURES
# variable "agones_open_match_mng_uses_arm_based_instances" {
# type = bool
# default = false
# }
# Default is an m5.large instance type: 2 vCPU, 8 GB Memory, EBS-Only Instance Storage, 10 Gbps Network Bandwidth, 4750 Mbps EBS Bandwidth
# Ensure that all instance types have the same specifications (same cpu and memory amounts) for proper scheduling and scaling
variable "agones_open_match_x86_instance_types" {
type = list(any)
default = ["m5.large"]
}
# Default is an m7g.large instance type: 2 vCPU, 8 GB Memory, EBS-Only Instance Storage, 12.5 Gbps Network Bandwidth, 10 Gbps EBS Bandwidth
# Ensure that all instance types have the same specifications (same cpu and memory amounts) for proper scheduling and scaling
# AS OF 8-21-2024, OPENMATCH DOES NOT SUPPORT ARM-BASED ARCHITECTURES
# variable "agones_open_match_arm_instance_types" {
# type = list(any)
# default = ["m7g.large"]
# }
variable "agones_open_match_x86_based_ami_type" {
type = string
default = "AL2_x86_64"
}
# AS OF 8-21-2024, OPENMATCH DOES NOT SUPPORT ARM-BASED ARCHITECTURES
# variable "agones_open_match_arm_based_ami_type" {
# type = string
# default = "AL2_ARM_64"
# }
variable "agones_openmatch_min_size" {
type = number
default = 1
}
variable "agones_openmatch_max_size" {
type = number
default = 3
}
variable "agones_openmatch_desired_size" {
type = number
default = 1
}
variable "gameserver_minport" {
type = number
default = 7000
}
variable "gameserver_maxport" {
type = number
default = 7029
}
variable "open_match" {
type = bool
}
variable "admin_role_arn" {
type = string
default = ""
description = "ARN of the admin role passed into the module"
}
variable "codebuild_role_arn" {
type = string
default = ""
description = "ARN of the CodeBuild service role"
}