-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
251 lines (215 loc) · 8.6 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
# ------------------------------------------------------------------------------
# REQUIRED PARAMETERS
#
# You must provide a value for each of these parameters.
# ------------------------------------------------------------------------------
variable "cvesync_lambda_s3_bucket" {
description = "The name of the S3 bucket where the cyhy-cvesync Lambda deployment package is stored."
nullable = false
type = string
}
variable "kevsync_lambda_s3_bucket" {
description = "The name of the S3 bucket where the cyhy-kevsync Lambda deployment package is stored."
nullable = false
type = string
}
variable "ssh_public_key_path" {
description = "The local path to store the SSH public key used to access the EC2 instance."
nullable = false
type = string
}
# ------------------------------------------------------------------------------
# OPTIONAL PARAMETERS
#
# These parameters have reasonable defaults.
# ------------------------------------------------------------------------------
variable "aws_availability_zones" {
default = ["us-east-1a", "us-east-1b", "us-east-1c"]
description = "The list of AWS availability zones to deploy into (e.g. [\"us-east-1a\", \"us-east-1b\", \"us-east-1c\"]."
nullable = false
type = list(string)
}
variable "aws_region" {
default = "us-east-1"
description = "The AWS region to deploy into (e.g. \"us-east-1\")."
nullable = false
type = string
}
variable "cvesync_lambda_cloudwatch_logs_retention_in_days" {
default = 90
description = "The number of days to retain CloudWatch logs for the Lambda function that syncs CVE data to the database in the Cyber Hygiene account."
nullable = false
type = number
}
variable "cvesync_lambda_config_ssm_key" {
default = "/cyhy-cvesync/config"
description = "The SSM key that contains the configuration to use for the Lambda function that syncs CVE data to the database in the Cyber Hygiene account."
nullable = false
type = string
}
variable "cvesync_lambda_description" {
default = "Syncs CVE data to the database in the Cyber Hygiene account."
description = "The description to associate with the Lambda function that syncs CVE data to the database in the Cyber Hygiene account."
nullable = false
type = string
}
variable "cvesync_lambda_env_variables" {
default = {}
description = "The environment variables to set for the Lambda function that syncs CVE data to the database in the Cyber Hygiene account."
nullable = false
type = map(string)
}
variable "cvesync_lambda_handler" {
default = "lambda_handler.handler"
description = "The handler to use for the Lambda function that syncs CVE data to the database in the Cyber Hygiene account."
nullable = false
type = string
}
variable "cvesync_lambda_memory" {
default = 2048
description = "The amount of memory (in MB) to allocate to the Lambda function that syncs CVE data to the database in the Cyber Hygiene account."
nullable = false
type = number
}
variable "cvesync_lambda_name" {
default = "cyhy-cvesync"
description = "The name to assign the Lambda function that syncs CVE data to the database in the Cyber Hygiene account."
nullable = false
type = string
}
variable "cvesync_lambda_runtime" {
default = "python3.12"
description = "The runtime to use for the Lambda function that syncs CVE data to the database in the Cyber Hygiene account."
nullable = false
type = string
}
variable "cvesync_lambda_s3_key" {
default = "cyhy-cvesync-lambda.zip"
description = "The key of the cyhy-cvesync Lambda deployment package in the S3 bucket."
nullable = false
type = string
}
variable "cvesync_lambda_schedule" {
default = "cron(0 5 * * ? *)"
description = "The EventBridge expression that represents when to run the Lambda function that syncs CVE data to the database in the Cyber Hygiene account. The default value indicates that the Lambda will run every day at 5:00 AM UTC. See <https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-scheduled-rule-pattern.html> for details on EventBridge expression syntax."
nullable = false
type = string
}
variable "cvesync_lambda_timeout" {
default = 900
description = "The timeout (in seconds) to use for the Lambda function that syncs CVE data to the database in the Cyber Hygiene account."
nullable = false
type = number
}
variable "db_cluster_size" {
default = 3
description = "The number of instances to use for the DocumentDB cluster."
nullable = false
type = number
}
variable "db_instance_class" {
default = "db.r5.large"
description = "The instance class to use for the DocumentDB cluster."
nullable = false
type = string
}
variable "db_name" {
default = "cyhy"
description = "The name of the database to create."
nullable = false
type = string
}
variable "db_password" {
description = "The master password for the database user."
nullable = false
type = string
}
variable "db_port" {
default = 27017
description = "The port to use for the DocumentDB cluster."
nullable = false
type = number
}
variable "db_username" {
description = "The master username for the database user."
nullable = false
type = string
}
variable "ec2_trusted_ingress_cidr_blocks" {
default = []
description = "The CIDR blocks to allow access to the EC2 instance."
nullable = false
type = list(string)
}
variable "kevsync_lambda_cloudwatch_logs_retention_in_days" {
default = 90
description = "The number of days to retain CloudWatch logs for the Lambda function that syncs KEV data to the database in the Cyber Hygiene account."
nullable = false
type = number
}
variable "kevsync_lambda_config_ssm_key" {
default = "/cyhy-kevsync/config"
description = "The SSM key that contains the configuration to use for the Lambda function that syncs KEV data to the database in the Cyber Hygiene account."
nullable = false
type = string
}
variable "kevsync_lambda_description" {
default = "Syncs KEV data to the database in the Cyber Hygiene account."
description = "The description to associate with the Lambda function that syncs KEV data to the database in the Cyber Hygiene account."
nullable = false
type = string
}
variable "kevsync_lambda_env_variables" {
default = {}
description = "The environment variables to set for the Lambda function that syncs KEV data to the database in the Cyber Hygiene account."
nullable = false
type = map(string)
}
variable "kevsync_lambda_handler" {
default = "lambda_handler.handler"
description = "The handler to use for the Lambda function that syncs KEV data to the database in the Cyber Hygiene account."
nullable = false
type = string
}
variable "kevsync_lambda_name" {
default = "cyhy-kevsync"
description = "The name to assign the Lambda function that syncs KEV data to the database in the Cyber Hygiene account."
nullable = false
type = string
}
variable "kevsync_lambda_runtime" {
default = "python3.12"
description = "The runtime to use for the Lambda function that syncs KEV data to the database in the Cyber Hygiene account."
nullable = false
type = string
}
variable "kevsync_lambda_s3_key" {
default = "cyhy-kevsync-lambda.zip"
description = "The key of the cyhy-kevsync Lambda deployment package in the S3 bucket."
nullable = false
type = string
}
variable "kevsync_lambda_schedule" {
default = "cron(0 6 * * ? *)"
description = "The EventBridge expression that represents when to run the Lambda function that syncs KEV data to the database in the Cyber Hygiene account. The default value indicates that the Lambda will run every day at 6:00 AM UTC. See <https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-scheduled-rule-pattern.html> for details on EventBridge expression syntax."
nullable = false
type = string
}
variable "kevsync_lambda_timeout" {
default = 300
description = "The timeout (in seconds) to use for the Lambda function that syncs KEV data to the database in the Cyber Hygiene account."
nullable = false
type = number
}
variable "tags" {
default = {}
description = "Tags to apply to all AWS resources created."
nullable = false
type = map(string)
}
variable "vpc_cidr_block" {
default = "10.0.0.0/16"
description = "The CIDR block to use for the VPC (e.g. \"10.0.0.0/16\")."
nullable = false
type = string
}