Skip to content

Commit 0610640

Browse files
committed
update: automatically switch status from new to notified
1 parent d0dcb6c commit 0610640

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

main.tf

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,22 @@ locals {
2626
resources = [var.kms_key_arn]
2727
}
2828

29+
lambda_policy_document_securityhub = {
30+
sid = "AllowSecurityHub"
31+
effect = "Allow"
32+
actions = ["securityhub:BatchImportFindings"]
33+
resources = ["*"]
34+
}
35+
2936
lambda_handler = try(split(".", basename(var.lambda_source_path))[0], "notify_slack")
3037
}
3138

3239
data "aws_iam_policy_document" "lambda" {
3340
count = var.create ? 1 : 0
3441

3542
dynamic "statement" {
36-
for_each = concat([local.lambda_policy_document], var.kms_key_arn != "" ? [local.lambda_policy_document_kms] : [])
43+
for_each = concat([local.lambda_policy_document,
44+
local.lambda_policy_document_securityhub], var.kms_key_arn != "" ? [local.lambda_policy_document_kms] : [])
3745
content {
3846
sid = statement.value.sid
3947
effect = statement.value.effect

0 commit comments

Comments
 (0)