File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11resource "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
Original file line number Diff line number Diff 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+ }
You can’t perform that action at this time.
0 commit comments