-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
214 lines (188 loc) · 5.92 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
# General Security Hub Configuration
# ----------------------------------
variable "auto_enable_controls" {
default = true
description = "Whether to automatically enable new controls when they are added to standards that are enabled"
type = bool
}
variable "control_finding_generator" {
default = "SECURITY_CONTROL"
description = "Updates whether the calling account has consolidated control findings turned on"
type = string
validation {
condition = contains(["SECURITY_CONTROL", "STANDARD_CONTROL"], var.control_finding_generator)
error_message = "Allowed values for control_finding_generator are \"SECURITY_CONTROL\" or \"STANDARD_CONTROL\"."
}
}
variable "enable_default_standards" {
default = true
description = "Whether to enable the default standards provided by Security Hub"
type = bool
}
variable "product_subscriptions" {
default = []
type = list(string)
description = <<EOT
List of product subscriptions to enable in Security Hub. Format: 'vendor/product'.
Available AWS products include:
- aws/guardduty
- aws/inspector
- aws/access-analyzer
- aws/macie
- aws/detective
- aws/health
- aws/config
- aws/firewall-manager
- aws/systems-manager
- aws/iam-access-analyzer
- aws/chatbot
- aws/auditmanager
- aws/cloudhsm
- aws/cloudsearch
- aws/cloudtrail
- aws/codebuild
- aws/cognito-idp
- aws/connect
- aws/dms
- aws/dynamodb
- aws/ebs
- aws/ec2
- aws/ecr
- aws/ecs
- aws/efs
- aws/eks
- aws/elasticache
- aws/elasticbeanstalk
- aws/elb
- aws/es
- aws/fsx
- aws/kinesis
- aws/lambda
- aws/network-firewall
- aws/opensearch
- aws/rds
- aws/redshift
- aws/route53
- aws/s3
- aws/sagemaker
- aws/secretsmanager
- aws/ses
- aws/shield
- aws/sns
- aws/sqs
- aws/ssm
- aws/waf
For the most up-to-date and complete list, refer to AWS documentation:
https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-findings-providers.html
EOT
}
# Security Standards Configuration
# --------------------------------
variable "cis_standard_version" {
default = "3.0.0"
description = "Version of the CIS AWS Foundations Benchmark to use"
type = string
}
variable "enable_aws_foundational_standard" {
default = true
description = "Enable AWS Foundational Security Best Practices v1.0.0"
type = bool
}
variable "enable_cis_standard" {
default = true
description = "Enable CIS AWS Foundations Benchmark"
type = bool
}
variable "enable_nist_standard" {
default = false
description = "Enable NIST SP 800-53 Rev. 5 standard"
type = bool
}
variable "enable_pci_dss_standard" {
default = false
description = "Enable PCI DSS v3.2.1"
type = bool
}
# Organization-level Configuration
# --------------------------------
variable "admin_account_id" {
default = null
description = "AWS account ID for the Security Hub administrator account (required if enable_organization_config is true)"
type = string
}
variable "auto_enable_new_accounts" {
default = true
description = "Automatically enable Security Hub for new accounts added to your organization (must be false when configuration_type_central is true)"
type = bool
}
variable "auto_enable_standards_for_new_accounts" {
default = true
description = "Automatically enable Security Hub default standards for new accounts added to your organization (must be false when configuration_type_central is true). When true, sets auto_enable_standards to 'DEFAULT', otherwise 'NONE'."
type = bool
}
variable "central_configuration_policies" {
default = {}
description = "Map of configuration policies to create in central configuration"
type = map(object({
description = string
enabled = bool
enabled_standard_arns = list(string)
enabled_control_identifiers = optional(list(string))
disabled_control_identifiers = optional(list(string))
custom_parameters = optional(list(object({
security_control_id = string
parameter = object({
name = string
value_type = string
bool = optional(bool)
double = optional(number)
enum = optional(string)
enum_list = optional(list(string))
int = optional(number)
int_list = optional(list(number))
string = optional(string)
string_list = optional(list(string))
})
})))
targets = list(string)
}))
}
variable "central_security_controls" {
default = {}
description = "Map of security controls to enable/disable in central configuration"
type = map(object({
enabled = bool
disabled_reason = string
}))
}
variable "configuration_type_central" {
default = false
description = "Whether to use CENTRAL configuration type for organization configuration"
type = bool
}
variable "enable_organization_config" {
default = false
description = "Whether to enable Security Hub configuration at the organization level"
type = bool
}
# Finding Aggregator Configuration
# --------------------------------
variable "enable_finding_aggregator" {
default = false
description = "Whether to enable the Security Hub finding aggregator (must be true if enable_organization_config is true)"
type = bool
}
variable "finding_aggregator_linking_mode" {
default = "ALL_REGIONS"
description = "Specifies the linking mode for the finding aggregator"
type = string
validation {
condition = contains(["ALL_REGIONS", "SPECIFIED_REGIONS", "ALL_REGIONS_EXCEPT_SPECIFIED"], var.finding_aggregator_linking_mode)
error_message = "Allowed values for finding_aggregator_linking_mode are \"ALL_REGIONS\" or \"ALL_REGIONS_EXCEPT_SPECIFIED\" or \"SPECIFIED_REGIONS\"."
}
}
variable "finding_aggregator_regions" {
default = null
description = "List of regions to aggregate findings from when linking_mode is SPECIFIED_REGIONS"
type = list(string)
}