Skip to content

Commit 5e992dc

Browse files
committed
docs: Added documentation for malware protection.
1 parent d4822cc commit 5e992dc

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

malware.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
resource "aws_iam_role" "malware" {
22
for_each = var.enable_malware_protection ? toset(["this"]) : toset([])
33

4-
name = "${local.bucket_name}-malware"
4+
name = "${local.bucket_name}-malware"
55
description = "Role for malware protection plan for S3 bucket ${local.bucket_name}"
6-
path = "/service-role/"
7-
tags = local.tags
6+
path = "/service-role/"
7+
tags = local.tags
88

99
assume_role_policy = jsonencode(yamldecode(templatefile("${path.module}/templates/malware-trust-policy.yaml.tftpl", {
1010
account : data.aws_caller_identity.identity.account_id

outputs.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,11 @@ output "kms_key_arn" {
2020
description = "ARN of the KMS key used for bucket encryption."
2121
value = local.kms_key_arn
2222
}
23+
24+
output "malware_protection_plan_arn" {
25+
description = <<-EOT
26+
ARN of the GuardDuty malware protection plan, if malware protection is
27+
enabled.
28+
EOT
29+
value = var.enable_malware_protection ? aws_guardduty_malware_protection_plan.this["this"].arn : null
30+
}

0 commit comments

Comments
 (0)