Skip to content

Commit 519c82e

Browse files
committed
Allow Security Hub product subscriptions from top module
1 parent 20d6c8e commit 519c82e

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ This module is composed of several submodules, all of which can be used independ
122122
| <a name="input_s3_ignore_public_acls"></a> [s3\_ignore\_public\_acls](#input\_s3\_ignore\_public\_acls) | Whether Amazon S3 should ignore public ACLs for buckets in this account. Defaults to true. | `bool` | `true` | no |
123123
| <a name="input_s3_restrict_public_buckets"></a> [s3\_restrict\_public\_buckets](#input\_s3\_restrict\_public\_buckets) | Whether Amazon S3 should restrict public bucket policies for buckets in this account. Defaults to true. | `bool` | `true` | no |
124124
| <a name="input_security_administrator_account_id"></a> [security\_administrator\_account\_id](#input\_security\_administrator\_account\_id) | AWS Security Administrator Account ID | `number` | n/a | yes |
125+
| <a name="input_securityhub_enable_products"></a> [securityhub\_enable\_products](#input\_securityhub\_enable\_products) | Subscribe Security Hub to Products | `list(string)` | `[]` | no |
125126
| <a name="input_tags"></a> [tags](#input\_tags) | Specifies object tags key and value. This applies to all resources created by this module. | `map(any)` | <pre>{<br> "Environment": "infra",<br> "Product": "security",<br> "Team": "devops",<br> "Terraform": true<br>}</pre> | no |
126127
| <a name="input_target_regions"></a> [target\_regions](#input\_target\_regions) | A list of regions to set up with this module. | `list(string)` | <pre>[<br> "eu-west-1",<br> "us-east-1",<br> "us-east-2"<br>]</pre> | no |
127128
| <a name="input_vpc_flow_logs_s3_key_prefix"></a> [vpc\_flow\_logs\_s3\_key\_prefix](#input\_vpc\_flow\_logs\_s3\_key\_prefix) | S3 key prefix for VPC Flow Logs | `string` | `"flow-logs"` | no |

securityhub.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module "securityhub_eu-west-1" {
88
aws = aws.eu-west-1
99
}
1010
account_type = var.account_type
11+
enable_products = var.securityhub_enable_products
1112
security_administrator_account_id = var.security_administrator_account_id
1213
}
1314

@@ -20,6 +21,7 @@ module "securityhub_us-east-1" {
2021
aws = aws.us-east-1
2122
}
2223
account_type = var.account_type
24+
enable_products = var.securityhub_enable_products
2325
security_administrator_account_id = var.security_administrator_account_id
2426
}
2527

@@ -32,5 +34,6 @@ module "securityhub_us-east-2" {
3234
aws = aws.us-east-2
3335
}
3436
account_type = var.account_type
37+
enable_products = var.securityhub_enable_products
3538
security_administrator_account_id = var.security_administrator_account_id
3639
}

variables.tf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,15 @@ variable "force_destroy" {
399399
# default = ""
400400
#}
401401

402+
### -----------------------------
403+
### Security Hub Settings
404+
### -----------------------------
405+
variable "securityhub_enable_products" {
406+
description = "Subscribe Security Hub to Products"
407+
type = list(string)
408+
default = []
409+
}
410+
402411
### -----------------------------
403412
### Organization Settings
404413
### -----------------------------

0 commit comments

Comments
 (0)