Skip to content

Commit e8b19d2

Browse files
committed
Implement supplier-config-ingress lambda
1 parent 89ea5d8 commit e8b19d2

15 files changed

Lines changed: 898 additions & 274 deletions

File tree

infrastructure/terraform/components/api/locals_alarms.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ locals {
2121
letter_updates_transformer = module.letter_updates_transformer.function_name
2222
mi_updates_transformer = module.mi_updates_transformer.function_name
2323
supplier_allocator = module.supplier_allocator.function_name
24+
supplier_config_ingress = module.supplier_config_ingress.function_name
2425
}
2526

2627
sqs_alarm_targets = {
2728
sqs_letter_updates = module.sqs_letter_updates.sqs_queue_name
2829
amendments_queue = module.amendments_queue.sqs_queue_name
2930
letter_status_updates_queue = module.letter_status_updates_queue.sqs_queue_name
3031
sqs_supplier_allocator = module.sqs_supplier_allocator.sqs_queue_name
32+
sqs_supplier_config = module.sqs_supplier_config.sqs_queue_name
3133
}
3234
}

infrastructure/terraform/components/api/module_lambda_supplier_config_ingress.tf

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
2-
3-
4-
5-
6-
7-
8-
9-
101
module "supplier_config_ingress" {
112
source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
123

@@ -75,4 +66,17 @@ data "aws_iam_policy_document" "supplier_config_ingress_lambda" {
7566
module.sqs_supplier_config.sqs_queue_arn
7667
]
7768
}
69+
70+
statement {
71+
sid = "AllowConfigDynamoDBWrite"
72+
effect = "Allow"
73+
74+
actions = [
75+
"dynamodb:UpdateItem",
76+
]
77+
78+
resources = [
79+
aws_dynamodb_table.supplier-configuration.arn,
80+
]
81+
}
7882
}

0 commit comments

Comments
 (0)