-
Notifications
You must be signed in to change notification settings - Fork 10
/
main.tf
46 lines (36 loc) · 1.18 KB
/
main.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
# Enable SecurityHub
module "account" {
source = "./modules/account"
auto_enable_controls = var.auto_enable_controls
control_finding_generator = var.control_finding_generator
enable_default_standards = var.enable_default_standards
}
# Manage subscriptions
module "subscriptions" {
source = "./modules/subscriptions"
standard_subscription_arns = var.standard_subscription_arns
product_subscription_arns = var.product_subscription_arns
depends_on = [
module.account
]
}
# Manage Control status
module "standards_controls" {
source = "./modules/standards_controls"
for_each = { for control in var.standards_controls : control.name => control }
standards_control_arn = each.value.standards_control_arn
control_status = each.value.control_status
disabled_reason = each.value.disabled_reason
depends_on = [
module.account,
module.subscriptions
]
}
# Manage action targets
module "action_targets" {
source = "./modules/action_target"
for_each = { for action_target in var.action_targets : action_target.name => action_target }
name = each.key
description = each.value.description
identifier = each.value.identifier
}