File tree Expand file tree Collapse file tree 3 files changed +23
-7
lines changed
Expand file tree Collapse file tree 3 files changed +23
-7
lines changed Original file line number Diff line number Diff line change @@ -103,9 +103,15 @@ data "aws_iam_policy_document" "kms" {
103103 resources = [" *" ]
104104
105105 condition {
106- test = " StringEquals "
106+ test = " ArnLike "
107107 variable = " kms:EncryptionContext:aws:sqs:arn"
108108 values = [" arn:aws:sqs:${ var . region } :${ var . aws_account_id } :*-validate-letter-template-files-queue" ]
109109 }
110+
111+ condition {
112+ test = " ArnLike"
113+ variable = " aws:SourceArn"
114+ values = [" arn:aws:events:${ var . region } :${ var . aws_account_id } :rule/*-quarantine-scan-passed-for-upload" ]
115+ }
110116 }
111117}
Original file line number Diff line number Diff line change @@ -124,16 +124,18 @@ data "aws_iam_policy_document" "kms" {
124124 resources = [" *" ]
125125
126126 condition {
127- test = " StringEquals"
128- variable = " kms:ViaService"
129- values = [" sqs.${ var . region } .amazonaws.com" ]
127+ test = " ArnEquals"
128+ variable = " kms:EncryptionContext:aws:sqs:arn"
129+ values = [
130+ module . backend_api . letter_file_validation_queue_arn
131+ ]
130132 }
131133
132134 condition {
133- test = " StringEquals "
134- variable = " kms:EncryptionContext: aws:sqs:arn "
135+ test = " ArnEquals "
136+ variable = " aws:SourceArn "
135137 values = [
136- module . sqs_validate_letter_template_files . sqs_queue_arn
138+ module . backend_api . upload_scan_passed_rule_arn
137139 ]
138140 }
139141 }
Original file line number Diff line number Diff line change @@ -38,3 +38,11 @@ output "quarantine_bucket_name" {
3838 value = module. s3bucket_quarantine . id
3939}
4040
41+ output "upload_scan_passed_rule_arn" {
42+ value = aws_cloudwatch_event_rule. guardduty_quarantine_scan_passed_for_upload . arn
43+ }
44+
45+ output "letter_file_validation_queue_arn" {
46+ value = module. sqs_validate_letter_template_files . sqs_queue_arn
47+ }
48+
You can’t perform that action at this time.
0 commit comments