-
Notifications
You must be signed in to change notification settings - Fork 16
/
variables.tf
354 lines (345 loc) · 10.3 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
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
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
variable "base_domain" {
type = string
description = "Base domain to use for ACM Cert and Route53 record management."
default = ""
}
variable "hosted_zone_id" {
type = string
description = "Id of hosted zone in Route53"
default = null
}
variable "cert_arn" {
type = string
description = "A custom ACM cert arn to use; only valid when create_networking is false."
default = ""
}
#EC2
variable "ec2_public_key" {
type = string
description = "SSH public key to use in EC2 instances."
default = ""
}
# VPC Variables
variable "create_networking" {
type = string
description = "Flag to create VPCs and related resources"
default = true
}
variable "vpc_id_use1" {
type = string
description = "ID of VPC in us-east-1 (required if create_networking==false)"
default = null
}
variable "vpc_id_use2" {
type = string
description = "ID of VPC in us-east-2 (required if create_networking==false)"
default = null
}
variable "vpc_id_usw2" {
type = string
description = "ID of VPC in us-west-2 (required if create_networking==false)"
default = null
}
variable "public_subnets_use1" {
type = list(string)
description = "Public subnets in VPC us-east-1 (required if create_networking==false)"
default = null
}
variable "public_subnets_use2" {
type = list(string)
description = "Public subnets in VPC us-east-2 (required if create_networking==false)"
default = null
}
variable "public_subnets_usw2" {
type = list(string)
description = "Public subnets in VPC us-west-2 (required if create_networking==false)"
default = null
}
variable "private_subnets_use1" {
type = list(string)
description = "Private subnets in VPC us-east-1 (required if create_networking==false)"
default = null
}
variable "private_subnets_use2" {
type = list(string)
description = "Private subnets in VPC us-east-2 (required if create_networking==false)"
default = null
}
variable "private_subnets_usw2" {
type = list(string)
description = "Private subnets in VPC us-west-2 (required if create_networking==false)"
default = null
}
variable "route_tables_use1" {
type = list(string)
description = "Route tables in VPC us-east-1 (required if create_networking==false)"
default = null
}
variable "route_tables_use2" {
type = list(string)
description = "Route tables in VPC us-east-2 (required if create_networking==false)"
default = null
}
variable "route_tables_usw2" {
type = list(string)
description = "Route tables in VPC us-west-2 (required if create_networking==false)"
default = null
}
variable "vpc_azs_use1" {
type = list(string)
description = "AZs of VPC in us-east-1 (required if create_networking==false)"
default = null
}
variable "vpc_azs_use2" {
type = list(string)
description = "AZs of VPC in us-east-2 (required if create_networking==false)"
default = null
}
variable "vpc_azs_usw2" {
type = list(string)
description = "AZs of VPC in us-east-2 (required if create_networking==false)"
default = null
}
variable "s3_interface_endpoint_use1" {
type = string
description = "S3 endpoint for VPC in us-east-1 (required if create_networking==false)"
default = null
}
variable "s3_interface_endpoint_use2" {
type = string
description = "S3 endpoint for VPC in us-east-2 (required if create_networking==false)"
default = null
}
variable "s3_interface_endpoint_usw2" {
type = string
description = "S3 endpoint for VPC in us-west-2 (required if create_networking==false)"
default = null
}
variable "use1_main_network_block" {
type = string
description = "Base CIDR block to be used in us-east-1."
default = "10.0.0.0/16"
}
variable "use2_main_network_block" {
type = string
description = "Base CIDR block to be used in us-east-2."
default = "10.10.0.0/16"
}
variable "usw2_main_network_block" {
type = string
description = "Base CIDR block to be used in us-west-2."
default = "10.20.0.0/16"
}
variable "subnet_prefix_extension" {
type = number
description = "CIDR block bits extension to calculate CIDR blocks of each subnetwork."
default = 4
}
variable "public_subnet_tags" {
type = map(string)
description = "Tags associated with public subnets"
default = {}
}
variable "private_subnet_tags" {
type = map(string)
description = "Tags associated with private subnets"
default = {}
}
variable "zone_offset" {
type = number
description = "CIDR block bits extension offset to calculate Public subnets, avoiding collisions with Private subnets."
default = 8
}
# Test Controller
variable "create_certbot_lambda" {
type = bool
description = "Boolean to create the certbot lambda to update the letsencrypt cert for the test controller."
default = true
}
variable "lambda_build_in_docker" {
type = bool
description = "Determines whether or not to build certbot lambda function in docker."
default = true
}
variable "lets_encrypt_email" {
type = string
description = "Email to associate with let's encrypt certificate"
}
variable "test_controller_github_repo" {
description = "The Github repo base name"
type = string
default = "opencbdc-tctl"
}
variable "test_controller_github_repo_owner" {
description = "The Github repo owner"
type = string
default = "mit-dci"
}
variable "test_controller_github_repo_branch" {
description = "The repo branch to use for the Test Controller deployment pipeline."
type = string
default = "trunk"
}
variable "test_controller_github_access_token" {
description = "Access token for cloning test controller repo"
type = string
}
variable "test_controller_node_container_build_image" {
type = string
description = "An optional custom container build image for test controller Nodejs depencies"
default = "node:14"
}
variable "test_controller_golang_container_build_image" {
type = string
description = "An optional custom container build image for test controller Golang depencies"
default = "golang:1.16"
}
variable "test_controller_app_container_base_image" {
type = string
description = "An optional custom container base image for the test controller and releated services"
default = "ubuntu:20.04"
}
variable "test_controller_launch_type" {
description = "The ECS task launch type to run the test controller."
type = string
default = "FARGATE"
}
variable "test_controller_cpu" {
description = "The ECS task CPU"
type = string
default = "4096"
}
variable "test_controller_memory" {
description = "The ECS task memory"
type = string
default = "30720"
}
variable "test_controller_health_check_grace_period_seconds" {
description = "The ECS service health check grace period in seconds"
type = number
default = 300
}
variable "transaction_processor_repo_url" {
description = "Transaction repo cloned by the test controller for load generation logic"
type = string
default = "https://github.com/mit-dci/opencbdc-tx.git"
}
variable "transaction_processor_main_branch" {
type = string
description = "Main branch of transaction repo"
default = "trunk"
}
variable "transaction_processor_github_access_token" {
type = string
description = "Access token for the transaction repo if permissions are required"
default = ""
}
variable "cluster_instance_type" {
type = string
description = "If test controller launch type is EC2, the instance size to use."
default = "c5ad.12xlarge"
}
# Opensearch
variable "create_opensearch" {
type = bool
description = "Boolean to create Opensearch domain and related resources"
default = false
}
variable "opensearch_master_user_name" {
type = string
description = "Master username of opensearch user"
default = "admin"
}
variable "opensearch_master_user_password" {
type = string
description = "Master password of opensearch user"
default = ""
sensitive = true
}
variable "opensearch_route53_record_ttl" {
type = string
description = "TTL for CNAME record of opensearch domain"
default = "600"
}
variable "opensearch_engine_version" {
type = string
description = "The engine version to use for the OpenSearch domain"
default = "OpenSearch_1.3"
}
variable "opensearch_instance_type" {
type = string
description = "Instance type used for Open Search cluster"
default = "r6g.large.search"
}
variable "opensearch_instance_count" {
type = string
description = "Number of instances to include in OpenSearch domain"
default = "1"
}
variable "opensearch_ebs_volume_type" {
type = string
description = "Type of EBS volume to back Open Search domain"
default = "gp2"
}
variable "opensearch_ebs_volume_size" {
type = string
description = "Size of EBS volume to back Open Search domain"
default = "10"
}
variable "fire_hose_buffering_interval" {
type = number
description = "Interval time between sending Fire Hoe buffer data to Open Search"
default = 60
}
variable "fire_hose_index_rotation_period" {
type = string
description = "The Elasticsearch index rotation period. Index rotation appends a timestamp to the IndexName to facilitate expiration of old data."
default = "OneDay"
}
# Seed Generator
variable "create_uhs_seed_generator" {
type = bool
description = "Determines whether or not to create uhs seed generator resources"
default = true
}
variable "uhs_seed_generator_max_vcpus" {
description = "Max vcpus allocatable to the seed generator environment"
type = string
default = "50"
}
variable "uhs_seed_generator_job_vcpu" {
description = "Vcpus required for a seed generator batch job"
type = string
default = "4"
}
variable "uhs_seed_generator_job_memory" {
description = "Memory required for a seed generator batch job"
type = string
default = "8192"
}
variable "uhs_seed_generator_batch_job_timeout" {
description = "Memory required for a seed generator batch job"
type = string
default = 1209600 # 14 days, max for Fargate
}
# Test Controller Agents
variable "agent_instance_types" {
type = list(string)
description = "The instance types used in agent launch templates."
default = [
"c5n.large",
"c5n.2xlarge",
"c5n.9xlarge",
"c5n.metal"
]
}
# Tags
variable "environment" {
type = string
description = "AWS tag to indicate environment name of each infrastructure object."
}
variable "resource_tags" {
type = map(string)
description = "Tags to set for all resources"
default = {}
}