forked from nozaq/terraform-aws-secure-baseline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
301 lines (247 loc) · 10.4 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
# --------------------------------------------------------------------------------------------------
# Variables for root module.
# --------------------------------------------------------------------------------------------------
variable "aws_account_id" {
description = "The AWS Account ID number of the account."
}
variable "region" {
description = "The AWS region in which global resources are set up."
}
variable "account_type" {
description = "The type of the AWS account. The possible values are `individual`, `master` and `member` . Specify `master` and `member` to set up centalized logging for multiple accounts in AWS Organization. Use individual` otherwise."
default = "individual"
}
variable "master_account_id" {
description = "The ID of the master AWS account to which the current AWS account is associated. Required if `account_type` is `member`."
default = ""
}
variable "member_accounts" {
description = "A list of IDs and emails of AWS accounts which associated as member accounts."
type = list(object({
account_id = string
email = string
}))
default = []
}
variable "target_regions" {
description = "A list of regions to set up with this module."
default = [
"ap-northeast-1",
"ap-northeast-2",
"ap-south-1",
"ap-southeast-1",
"ap-southeast-2",
"ca-central-1",
"eu-central-1",
"eu-north-1",
"eu-west-1",
"eu-west-2",
"eu-west-3",
"sa-east-1",
"us-east-1",
"us-east-2",
"us-west-1",
"us-west-2"
]
}
variable "tags" {
description = "Specifies object tags key and value. This applies to all resources created by this module."
default = {
}
}
# --------------------------------------------------------------------------------------------------
# Variables for audit log bucket configurations.
# --------------------------------------------------------------------------------------------------
variable "audit_log_bucket_name" {
description = "The name of the S3 bucket to store various audit logs."
}
variable "audit_log_bucket_custom_policy_json" {
description = "Override policy for the audit log bucket. Allows addition of extra policies."
default = "{}"
}
variable "audit_log_lifecycle_glacier_transition_days" {
description = "The number of days after log creation when the log file is archived into Glacier."
default = 90
}
variable "audit_log_bucket_force_destroy" {
description = "A boolean that indicates all objects should be deleted from the audit log bucket so that the bucket can be destroyed without error. These objects are not recoverable."
default = false
}
variable "use_external_audit_log_bucket" {
description = "A boolean that indicates whether the specific audit log bucket already exists. Create a new S3 bucket if it is set to false."
default = false
}
# --------------------------------------------------------------------------------------------------
# Variables for iam-baseline module.
# --------------------------------------------------------------------------------------------------
variable "master_iam_role_name" {
description = "The name of the IAM Master role."
default = "IAM-Master"
}
variable "master_iam_role_policy_name" {
description = "The name of the IAM Master role policy."
default = "IAM-Master-Policy"
}
variable "manager_iam_role_name" {
description = "The name of the IAM Manager role."
default = "IAM-Manager"
}
variable "manager_iam_role_policy_name" {
description = "The name of the IAM Manager role policy."
default = "IAM-Manager-Policy"
}
variable "support_iam_role_name" {
description = "The name of the the support role."
default = "IAM-Support"
}
variable "support_iam_role_policy_name" {
description = "The name of the support role policy."
default = "IAM-Support-Role"
}
variable "support_iam_role_principal_arns" {
type = list
description = "List of ARNs of the IAM principal elements by which the support role could be assumed."
}
variable "max_password_age" {
description = "The number of days that an user password is valid."
default = 90
}
variable "minimum_password_length" {
description = "Minimum length to require for user passwords."
default = 14
}
variable "password_reuse_prevention" {
description = "The number of previous passwords that users are prevented from reusing."
default = 24
}
variable "require_lowercase_characters" {
description = "Whether to require lowercase characters for user passwords."
default = true
}
variable "require_numbers" {
description = "Whether to require numbers for user passwords."
default = true
}
variable "require_uppercase_characters" {
description = "Whether to require uppercase characters for user passwords."
default = true
}
variable "require_symbols" {
description = "Whether to require symbols for user passwords."
default = true
}
variable "allow_users_to_change_password" {
description = "Whether to allow users to change their own password."
default = true
}
# --------------------------------------------------------------------------------------------------
# Variables for vpc-baseline module.
# --------------------------------------------------------------------------------------------------
variable "vpc_iam_role_name" {
description = "The name of the IAM Role which VPC Flow Logs will use."
default = "VPC-Flow-Logs-Publisher"
}
variable "vpc_iam_role_policy_name" {
description = "The name of the IAM Role Policy which VPC Flow Logs will use."
default = "VPC-Flow-Logs-Publish-Policy"
}
variable "vpc_log_group_name" {
description = "The name of CloudWatch Logs group to which VPC Flow Logs are delivered."
default = "default-vpc-flow-logs"
}
variable "vpc_log_retention_in_days" {
description = "Number of days to retain logs for. CIS recommends 365 days. Possible values are: 0, 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653. Set to 0 to keep logs indefinitely."
default = 365
}
# --------------------------------------------------------------------------------------------------
# Variables for config-baseline module.
# --------------------------------------------------------------------------------------------------
variable "config_delivery_frequency" {
description = "The frequency which AWS Config sends a snapshot into the S3 bucket."
default = "One_Hour"
}
variable "config_iam_role_name" {
description = "The name of the IAM Role which AWS Config will use."
default = "Config-Recorder"
}
variable "config_iam_role_policy_name" {
description = "The name of the IAM Role Policy which AWS Config will use."
default = "Config-Recorder-Policy"
}
variable "config_s3_bucket_key_prefix" {
description = "The prefix used when writing AWS Config snapshots into the S3 bucket."
default = "config"
}
variable "config_sns_topic_name" {
description = "The name of the SNS Topic to be used to notify configuration changes."
default = "ConfigChanges"
}
variable "config_aggregator_name" {
description = "The name of the organizational AWS Config Configuration Aggregator."
default = "organization-aggregator"
}
variable "config_aggregator_name_prefix" {
description = "The prefix of the name for the IAM role attached to the organizational AWS Config Configuration Aggregator."
default = "config-for-organization-role"
}
# --------------------------------------------------------------------------------------------------
# Variables for cloudtrail-baseline module.
# --------------------------------------------------------------------------------------------------
variable "cloudtrail_cloudwatch_logs_group_name" {
description = "The name of CloudWatch Logs group to which CloudTrail events are delivered."
default = "cloudtrail-multi-region"
}
variable "cloudwatch_logs_retention_in_days" {
description = "Number of days to retain logs for. CIS recommends 365 days. Possible values are: 0, 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653. Set to 0 to keep logs indefinitely."
default = 365
}
variable "cloudtrail_iam_role_name" {
description = "The name of the IAM Role to be used by CloudTrail to delivery logs to CloudWatch Logs group."
default = "CloudTrail-CloudWatch-Delivery-Role"
}
variable "cloudtrail_iam_role_policy_name" {
description = "The name of the IAM Role Policy to be used by CloudTrail to delivery logs to CloudWatch Logs group."
default = "CloudTrail-CloudWatch-Delivery-Policy"
}
variable "cloudtrail_key_deletion_window_in_days" {
description = "Duration in days after which the key is deleted after destruction of the resource, must be between 7 and 30 days. Defaults to 30 days."
default = 10
}
variable "cloudtrail_name" {
description = "The name of the trail."
default = "cloudtrail-multi-region"
}
variable "cloudtrail_sns_topic_name" {
description = "The name of the sns topic to link to the trail."
default = "cloudtrail-multi-region-sns-topic"
}
variable "cloudtrail_s3_key_prefix" {
description = "The prefix used when CloudTrail delivers events to the S3 bucket."
default = "cloudtrail"
}
# --------------------------------------------------------------------------------------------------
# Variables for alarm-baseline module.
# --------------------------------------------------------------------------------------------------
variable "alarm_namespace" {
description = "The namespace in which all alarms are set up."
default = "CISBenchmark"
}
variable "alarm_sns_topic_name" {
description = "The name of the SNS Topic which will be notified when any alarm is performed."
default = "CISAlarm"
}
# --------------------------------------------------------------------------------------------------
# Variables for guardduty-baseline module.
# --------------------------------------------------------------------------------------------------
variable "guardduty_disable_email_notification" {
description = "Boolean whether an email notification is sent to the accounts."
default = false
}
variable "guardduty_finding_publishing_frequency" {
description = "Specifies the frequency of notifications sent for subsequent finding occurrences."
default = "SIX_HOURS"
}
variable "guardduty_invitation_message" {
description = "Message for invitation."
default = "This is an automatic invitation message from guardduty-baseline module."
}