-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmodule_sqs_pdm_uploader.tf
More file actions
38 lines (29 loc) · 917 Bytes
/
module_sqs_pdm_uploader.tf
File metadata and controls
38 lines (29 loc) · 917 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
module "sqs_pdm_uploader" {
source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.24/terraform-sqs.zip"
aws_account_id = var.aws_account_id
component = local.component
environment = var.environment
project = var.project
region = var.region
name = "pdm-uploader"
sqs_kms_key_arn = module.kms.key_arn
visibility_timeout_seconds = 60
create_dlq = true
sqs_policy_overload = data.aws_iam_policy_document.sqs_pdm_uploader.json
}
data "aws_iam_policy_document" "sqs_pdm_uploader" {
statement {
sid = "AllowEventBridgeToSendMessage"
effect = "Allow"
principals {
type = "Service"
identifiers = ["events.amazonaws.com"]
}
actions = [
"sqs:SendMessage"
]
resources = [
"arn:aws:sqs:${var.region}:${var.aws_account_id}:${local.csi}-pdm-uploader-queue"
]
}
}