Skip to content

Commit df6915f

Browse files
committed
post merge fixes
1 parent 4cfd90e commit df6915f

File tree

3 files changed

+35
-36
lines changed

3 files changed

+35
-36
lines changed

infrastructure/terraform/modules/backend-api/module_create_routing_config_lambda.tf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module "get_routing_config_lambda" {
1+
module "create_routing_config_lambda" {
22
source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.22/terraform-lambda.zip"
33

44
project = var.project
@@ -9,11 +9,11 @@ module "get_routing_config_lambda" {
99

1010
kms_key_arn = var.kms_key_arn
1111

12-
function_name = "get-routing-config"
12+
function_name = "create-routing-config"
1313

14-
function_module_name = "get-routing-config"
14+
function_module_name = "create-routing-config"
1515
handler_function_name = "handler"
16-
description = "Get Routing Config API endpoint"
16+
description = "Create Routing Config API endpoint"
1717

1818
memory = 512
1919
timeout = 3
@@ -28,20 +28,20 @@ module "get_routing_config_lambda" {
2828
lambda_env_vars = local.backend_lambda_environment_variables
2929
function_s3_bucket = var.function_s3_bucket
3030
function_code_base_path = local.lambdas_dir
31-
function_code_dir = "backend-api/dist/get-routing-config"
31+
function_code_dir = "backend-api/dist/created-routing-config"
3232

3333
send_to_firehose = var.send_to_firehose
3434
log_destination_arn = var.log_destination_arn
3535
log_subscription_role_arn = var.log_subscription_role_arn
3636
}
3737

38-
data "aws_iam_policy_document" "get_routing_config_lambda_policy" {
38+
data "aws_iam_policy_document" "create_routing_config_lambda_policy" {
3939
statement {
4040
sid = "AllowDynamoAccess"
4141
effect = "Allow"
4242

4343
actions = [
44-
"dynamodb:GetItem",
44+
"dynamodb:PutItem",
4545
]
4646

4747
resources = [

infrastructure/terraform/modules/backend-api/module_get_routing_config_lambda.tf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module "create_routing_config_lambda" {
1+
module "get_routing_config_lambda" {
22
source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.22/terraform-lambda.zip"
33

44
project = var.project
@@ -9,11 +9,11 @@ module "create_routing_config_lambda" {
99

1010
kms_key_arn = var.kms_key_arn
1111

12-
function_name = "create-routing-config"
12+
function_name = "get-routing-config"
1313

14-
function_module_name = "create-routing-config"
14+
function_module_name = "get-routing-config"
1515
handler_function_name = "handler"
16-
description = "Create Routing Config API endpoint"
16+
description = "Get Routing Config API endpoint"
1717

1818
memory = 512
1919
timeout = 3
@@ -28,20 +28,20 @@ module "create_routing_config_lambda" {
2828
lambda_env_vars = local.backend_lambda_environment_variables
2929
function_s3_bucket = var.function_s3_bucket
3030
function_code_base_path = local.lambdas_dir
31-
function_code_dir = "backend-api/dist/created-routing-config"
31+
function_code_dir = "backend-api/dist/get-routing-config"
3232

3333
send_to_firehose = var.send_to_firehose
3434
log_destination_arn = var.log_destination_arn
3535
log_subscription_role_arn = var.log_subscription_role_arn
3636
}
3737

38-
data "aws_iam_policy_document" "create_routing_config_lambda_policy" {
38+
data "aws_iam_policy_document" "get_routing_config_lambda_policy" {
3939
statement {
4040
sid = "AllowDynamoAccess"
4141
effect = "Allow"
4242

4343
actions = [
44-
"dynamodb:PutItem",
44+
"dynamodb:GetItem",
4545
]
4646

4747
resources = [

infrastructure/terraform/modules/backend-api/spec.tmpl.json

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,15 @@
297297
"ClientConfiguration": {
298298
"properties": {
299299
"campaignId": {
300+
"deprecated": true,
300301
"type": "string"
301302
},
303+
"campaignIds": {
304+
"items": {
305+
"type": "string"
306+
},
307+
"type": "array"
308+
},
302309
"features": {
303310
"$ref": "#/components/schemas/ClientFeatures"
304311
}
@@ -752,30 +759,22 @@
752759
],
753760
"type": "string"
754761
},
755-
"UploadLetterProperties": {
756-
"properties": {
757-
"files": {
758-
"$ref": "#/components/schemas/LetterFiles"
759-
},
760-
"language": {
761-
"$ref": "#/components/schemas/Language"
762-
},
763-
"letterType": {
764-
"$ref": "#/components/schemas/LetterType"
762+
"UploadLetterProperties": {
763+
"allOf": [
764+
{
765+
"$ref": "#/components/schemas/BaseLetterTemplateProperties"
765766
},
766-
"templateType": {
767-
"enum": [
768-
"LETTER"
769-
],
770-
"type": "string"
767+
{
768+
"properties": {
769+
"campaignId": {
770+
"type": "string"
771+
}
772+
},
773+
"required": [
774+
"campaignId"
775+
]
771776
}
772-
},
773-
"required": [
774-
"letterType",
775-
"language",
776-
"templateType"
777-
],
778-
"type": "object"
777+
]
779778
},
780779
"VersionedFileDetails": {
781780
"properties": {

0 commit comments

Comments
 (0)