diff --git a/infrastructure/terraform/components/app/README.md b/infrastructure/terraform/components/app/README.md
index 9dfed2430..efeeab36c 100644
--- a/infrastructure/terraform/components/app/README.md
+++ b/infrastructure/terraform/components/app/README.md
@@ -50,7 +50,7 @@
|------|--------|---------|
| [amplify\_branch](#module\_amplify\_branch) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.20/terraform-amp_branch.zip | n/a |
| [backend\_api](#module\_backend\_api) | ../../modules/backend-api | n/a |
-| [download\_authorizer\_lambda](#module\_download\_authorizer\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
+| [download\_authorizer\_lambda](#module\_download\_authorizer\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
| [eventpub](#module\_eventpub) | git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/eventpub | v2.0.28 |
| [kms](#module\_kms) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.20/terraform-kms.zip | n/a |
| [kms\_us\_east\_1](#module\_kms\_us\_east\_1) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.20/terraform-kms.zip | n/a |
diff --git a/infrastructure/terraform/components/app/module_backend_api.tf b/infrastructure/terraform/components/app/module_backend_api.tf
index 58f4e94bf..15dd60915 100644
--- a/infrastructure/terraform/components/app/module_backend_api.tf
+++ b/infrastructure/terraform/components/app/module_backend_api.tf
@@ -25,8 +25,6 @@ module "backend_api" {
log_destination_arn = local.log_destination_arn
log_subscription_role_arn = local.acct.log_subscription_role_arn
- send_to_firehose = true
-
email_domain = module.ses.domain
template_submitted_sender_email_address = "template-submitted@${module.ses.domain}"
proof_requested_sender_email_address = "proof-requested@${module.ses.domain}"
diff --git a/infrastructure/terraform/components/app/module_download_authorizer_lambda.tf b/infrastructure/terraform/components/app/module_download_authorizer_lambda.tf
index b3df4edce..236c802f0 100644
--- a/infrastructure/terraform/components/app/module_download_authorizer_lambda.tf
+++ b/infrastructure/terraform/components/app/module_download_authorizer_lambda.tf
@@ -1,5 +1,5 @@
module "download_authorizer_lambda" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
providers = {
aws = aws.us-east-1
@@ -31,6 +31,9 @@ module "download_authorizer_lambda" {
timeout = 3
lambda_at_edge = true
enable_lambda_insights = false
+
+ log_destination_arn = local.log_destination_arn
+ log_subscription_role_arn = local.acct.log_subscription_role_arn
}
data "aws_iam_policy_document" "authorizer" {
diff --git a/infrastructure/terraform/components/app/variables.tf b/infrastructure/terraform/components/app/variables.tf
index 4878f5578..4e8f961fb 100644
--- a/infrastructure/terraform/components/app/variables.tf
+++ b/infrastructure/terraform/components/app/variables.tf
@@ -110,7 +110,7 @@ variable "CSRF_SECRET" {
# Github only does uppercase env vars
type = string
description = "Secure cryptographic key to be used for generating CSRF tokens - This is intended to be read from CI variables and not committed to any codebase"
- default = "value"
+ default = "value"
}
variable "branch_name" {
diff --git a/infrastructure/terraform/components/sandbox/module_cognito_triggers.tf b/infrastructure/terraform/components/sandbox/module_cognito_triggers.tf
index 5d5a32d46..bf5152792 100644
--- a/infrastructure/terraform/components/sandbox/module_cognito_triggers.tf
+++ b/infrastructure/terraform/components/sandbox/module_cognito_triggers.tf
@@ -12,4 +12,5 @@ module "cognito_triggers" {
kms_key_arn = data.aws_kms_key.sandbox.arn
log_retention_in_days = var.log_retention_in_days
user_pool_id = aws_cognito_user_pool.sandbox.id
+ send_to_firehose = false
}
diff --git a/infrastructure/terraform/modules/backend-api/README.md b/infrastructure/terraform/modules/backend-api/README.md
index c5336b9d6..2197b0c81 100644
--- a/infrastructure/terraform/modules/backend-api/README.md
+++ b/infrastructure/terraform/modules/backend-api/README.md
@@ -29,33 +29,33 @@ No requirements.
| [project](#input\_project) | The name of the tfscaffold project | `string` | n/a | yes |
| [proof\_requested\_sender\_email\_address](#input\_proof\_requested\_sender\_email\_address) | Proof requested sender email address | `string` | n/a | yes |
| [region](#input\_region) | The AWS Region | `string` | n/a | yes |
-| [send\_to\_firehose](#input\_send\_to\_firehose) | Flag indicating whether logs should be sent to firehose | `bool` | n/a | yes |
+| [send\_to\_firehose](#input\_send\_to\_firehose) | Flag indicating whether logs should be sent to firehose | `bool` | `true` | no |
| [sns\_topic\_arn](#input\_sns\_topic\_arn) | SNS topic ARN | `string` | `null` | no |
| [template\_submitted\_sender\_email\_address](#input\_template\_submitted\_sender\_email\_address) | Template submitted sender email address | `string` | n/a | yes |
## Modules
| Name | Source | Version |
|------|--------|---------|
-| [authorizer\_lambda](#module\_authorizer\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
-| [count\_routing\_configs\_lambda](#module\_count\_routing\_configs\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
-| [create\_routing\_config\_lambda](#module\_create\_routing\_config\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
-| [create\_template\_lambda](#module\_create\_template\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
-| [delete\_routing\_config\_lambda](#module\_delete\_routing\_config\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
-| [delete\_template\_lambda](#module\_delete\_template\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
-| [get\_client\_lambda](#module\_get\_client\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
-| [get\_routing\_config\_lambda](#module\_get\_routing\_config\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
-| [get\_template\_lambda](#module\_get\_template\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
-| [lambda\_copy\_scanned\_object\_to\_internal](#module\_lambda\_copy\_scanned\_object\_to\_internal) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
-| [lambda\_delete\_failed\_scanned\_object](#module\_lambda\_delete\_failed\_scanned\_object) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
-| [lambda\_event\_publisher](#module\_lambda\_event\_publisher) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
-| [lambda\_process\_proof](#module\_lambda\_process\_proof) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
-| [lambda\_set\_file\_virus\_scan\_status\_for\_upload](#module\_lambda\_set\_file\_virus\_scan\_status\_for\_upload) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
-| [lambda\_sftp\_poll](#module\_lambda\_sftp\_poll) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
-| [lambda\_sftp\_request\_proof](#module\_lambda\_sftp\_request\_proof) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
-| [lambda\_validate\_letter\_template\_files](#module\_lambda\_validate\_letter\_template\_files) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
-| [list\_routing\_configs\_lambda](#module\_list\_routing\_configs\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
-| [list\_template\_lambda](#module\_list\_template\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
-| [request\_proof\_lambda](#module\_request\_proof\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
+| [authorizer\_lambda](#module\_authorizer\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
+| [count\_routing\_configs\_lambda](#module\_count\_routing\_configs\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
+| [create\_routing\_config\_lambda](#module\_create\_routing\_config\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
+| [create\_template\_lambda](#module\_create\_template\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
+| [delete\_routing\_config\_lambda](#module\_delete\_routing\_config\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
+| [delete\_template\_lambda](#module\_delete\_template\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
+| [get\_client\_lambda](#module\_get\_client\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
+| [get\_routing\_config\_lambda](#module\_get\_routing\_config\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
+| [get\_template\_lambda](#module\_get\_template\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
+| [lambda\_copy\_scanned\_object\_to\_internal](#module\_lambda\_copy\_scanned\_object\_to\_internal) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
+| [lambda\_delete\_failed\_scanned\_object](#module\_lambda\_delete\_failed\_scanned\_object) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
+| [lambda\_event\_publisher](#module\_lambda\_event\_publisher) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
+| [lambda\_process\_proof](#module\_lambda\_process\_proof) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
+| [lambda\_set\_file\_virus\_scan\_status\_for\_upload](#module\_lambda\_set\_file\_virus\_scan\_status\_for\_upload) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
+| [lambda\_sftp\_poll](#module\_lambda\_sftp\_poll) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
+| [lambda\_sftp\_request\_proof](#module\_lambda\_sftp\_request\_proof) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
+| [lambda\_validate\_letter\_template\_files](#module\_lambda\_validate\_letter\_template\_files) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
+| [list\_routing\_configs\_lambda](#module\_list\_routing\_configs\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
+| [list\_template\_lambda](#module\_list\_template\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
+| [request\_proof\_lambda](#module\_request\_proof\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
| [s3bucket\_download](#module\_s3bucket\_download) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.20/terraform-s3bucket.zip | n/a |
| [s3bucket\_internal](#module\_s3bucket\_internal) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.20/terraform-s3bucket.zip | n/a |
| [s3bucket\_quarantine](#module\_s3bucket\_quarantine) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.20/terraform-s3bucket.zip | n/a |
@@ -64,11 +64,11 @@ No requirements.
| [sqs\_template\_mgmt\_events](#module\_sqs\_template\_mgmt\_events) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-sqs.zip | n/a |
| [sqs\_template\_table\_events\_pipe\_dlq](#module\_sqs\_template\_table\_events\_pipe\_dlq) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-sqs.zip | n/a |
| [sqs\_validate\_letter\_template\_files](#module\_sqs\_validate\_letter\_template\_files) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-sqs.zip | n/a |
-| [submit\_routing\_config\_lambda](#module\_submit\_routing\_config\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
-| [submit\_template\_lambda](#module\_submit\_template\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
-| [update\_routing\_config\_lambda](#module\_update\_routing\_config\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
-| [update\_template\_lambda](#module\_update\_template\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
-| [upload\_letter\_template\_lambda](#module\_upload\_letter\_template\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
+| [submit\_routing\_config\_lambda](#module\_submit\_routing\_config\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
+| [submit\_template\_lambda](#module\_submit\_template\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
+| [update\_routing\_config\_lambda](#module\_update\_routing\_config\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
+| [update\_template\_lambda](#module\_update\_template\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
+| [upload\_letter\_template\_lambda](#module\_upload\_letter\_template\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
## Outputs
| Name | Description |
diff --git a/infrastructure/terraform/modules/backend-api/dynamodb_table_routing_configuration.tf b/infrastructure/terraform/modules/backend-api/dynamodb_table_routing_configuration.tf
index 14ab9bb21..c151d36e3 100644
--- a/infrastructure/terraform/modules/backend-api/dynamodb_table_routing_configuration.tf
+++ b/infrastructure/terraform/modules/backend-api/dynamodb_table_routing_configuration.tf
@@ -40,9 +40,9 @@ resource "aws_dynamodb_table" "routing_configuration" {
}
global_secondary_index {
- name = "QueryById"
- hash_key = "id"
- projection_type = "KEYS_ONLY"
+ name = "QueryById"
+ hash_key = "id"
+ projection_type = "KEYS_ONLY"
}
stream_enabled = true
diff --git a/infrastructure/terraform/modules/backend-api/module_authorizer_lambda.tf b/infrastructure/terraform/modules/backend-api/module_authorizer_lambda.tf
index 28bed1fed..1a8ffa0ea 100644
--- a/infrastructure/terraform/modules/backend-api/module_authorizer_lambda.tf
+++ b/infrastructure/terraform/modules/backend-api/module_authorizer_lambda.tf
@@ -1,5 +1,5 @@
module "authorizer_lambda" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
diff --git a/infrastructure/terraform/modules/backend-api/module_count_routing_configs_lambda.tf b/infrastructure/terraform/modules/backend-api/module_count_routing_configs_lambda.tf
index 225f857f3..9312674ba 100644
--- a/infrastructure/terraform/modules/backend-api/module_count_routing_configs_lambda.tf
+++ b/infrastructure/terraform/modules/backend-api/module_count_routing_configs_lambda.tf
@@ -1,5 +1,5 @@
module "count_routing_configs_lambda" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
diff --git a/infrastructure/terraform/modules/backend-api/module_create_routing_config_lambda.tf b/infrastructure/terraform/modules/backend-api/module_create_routing_config_lambda.tf
index 60273f43f..22c887e24 100644
--- a/infrastructure/terraform/modules/backend-api/module_create_routing_config_lambda.tf
+++ b/infrastructure/terraform/modules/backend-api/module_create_routing_config_lambda.tf
@@ -1,5 +1,5 @@
module "create_routing_config_lambda" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
diff --git a/infrastructure/terraform/modules/backend-api/module_create_template_lambda.tf b/infrastructure/terraform/modules/backend-api/module_create_template_lambda.tf
index 51a0cf8d5..c3a58ced6 100644
--- a/infrastructure/terraform/modules/backend-api/module_create_template_lambda.tf
+++ b/infrastructure/terraform/modules/backend-api/module_create_template_lambda.tf
@@ -1,5 +1,5 @@
module "create_template_lambda" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
diff --git a/infrastructure/terraform/modules/backend-api/module_delete_routing_config_lambda.tf b/infrastructure/terraform/modules/backend-api/module_delete_routing_config_lambda.tf
index f91d87188..88029890c 100644
--- a/infrastructure/terraform/modules/backend-api/module_delete_routing_config_lambda.tf
+++ b/infrastructure/terraform/modules/backend-api/module_delete_routing_config_lambda.tf
@@ -1,5 +1,5 @@
module "delete_routing_config_lambda" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
diff --git a/infrastructure/terraform/modules/backend-api/module_delete_template_lambda.tf b/infrastructure/terraform/modules/backend-api/module_delete_template_lambda.tf
index 0cb82aa6a..e17c4ed51 100644
--- a/infrastructure/terraform/modules/backend-api/module_delete_template_lambda.tf
+++ b/infrastructure/terraform/modules/backend-api/module_delete_template_lambda.tf
@@ -1,5 +1,5 @@
module "delete_template_lambda" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
diff --git a/infrastructure/terraform/modules/backend-api/module_get_client_lambda.tf b/infrastructure/terraform/modules/backend-api/module_get_client_lambda.tf
index 355f1491b..d227b77b4 100644
--- a/infrastructure/terraform/modules/backend-api/module_get_client_lambda.tf
+++ b/infrastructure/terraform/modules/backend-api/module_get_client_lambda.tf
@@ -1,5 +1,5 @@
module "get_client_lambda" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
diff --git a/infrastructure/terraform/modules/backend-api/module_get_routing_config_lambda.tf b/infrastructure/terraform/modules/backend-api/module_get_routing_config_lambda.tf
index 03f4610dc..848377371 100644
--- a/infrastructure/terraform/modules/backend-api/module_get_routing_config_lambda.tf
+++ b/infrastructure/terraform/modules/backend-api/module_get_routing_config_lambda.tf
@@ -1,5 +1,5 @@
module "get_routing_config_lambda" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
diff --git a/infrastructure/terraform/modules/backend-api/module_get_template_lambda.tf b/infrastructure/terraform/modules/backend-api/module_get_template_lambda.tf
index 57c156fed..652959119 100644
--- a/infrastructure/terraform/modules/backend-api/module_get_template_lambda.tf
+++ b/infrastructure/terraform/modules/backend-api/module_get_template_lambda.tf
@@ -1,5 +1,5 @@
module "get_template_lambda" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
diff --git a/infrastructure/terraform/modules/backend-api/module_lambda_copy_scanned_object_to_internal.tf b/infrastructure/terraform/modules/backend-api/module_lambda_copy_scanned_object_to_internal.tf
index 82b3fd090..3ef683670 100644
--- a/infrastructure/terraform/modules/backend-api/module_lambda_copy_scanned_object_to_internal.tf
+++ b/infrastructure/terraform/modules/backend-api/module_lambda_copy_scanned_object_to_internal.tf
@@ -1,5 +1,5 @@
module "lambda_copy_scanned_object_to_internal" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
diff --git a/infrastructure/terraform/modules/backend-api/module_lambda_delete_failed_scanned_object.tf b/infrastructure/terraform/modules/backend-api/module_lambda_delete_failed_scanned_object.tf
index 7866962e6..58f8e87f8 100644
--- a/infrastructure/terraform/modules/backend-api/module_lambda_delete_failed_scanned_object.tf
+++ b/infrastructure/terraform/modules/backend-api/module_lambda_delete_failed_scanned_object.tf
@@ -1,5 +1,5 @@
module "lambda_delete_failed_scanned_object" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
diff --git a/infrastructure/terraform/modules/backend-api/module_lambda_event_publisher.tf b/infrastructure/terraform/modules/backend-api/module_lambda_event_publisher.tf
index c9b2ee3c1..cbb6e4f67 100644
--- a/infrastructure/terraform/modules/backend-api/module_lambda_event_publisher.tf
+++ b/infrastructure/terraform/modules/backend-api/module_lambda_event_publisher.tf
@@ -1,5 +1,5 @@
module "lambda_event_publisher" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
diff --git a/infrastructure/terraform/modules/backend-api/module_lambda_process_proof.tf b/infrastructure/terraform/modules/backend-api/module_lambda_process_proof.tf
index a09f3078f..fcd53f66e 100644
--- a/infrastructure/terraform/modules/backend-api/module_lambda_process_proof.tf
+++ b/infrastructure/terraform/modules/backend-api/module_lambda_process_proof.tf
@@ -1,5 +1,5 @@
module "lambda_process_proof" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
diff --git a/infrastructure/terraform/modules/backend-api/module_lambda_request_proof.tf b/infrastructure/terraform/modules/backend-api/module_lambda_request_proof.tf
index 7a8240dea..2f15d60b7 100644
--- a/infrastructure/terraform/modules/backend-api/module_lambda_request_proof.tf
+++ b/infrastructure/terraform/modules/backend-api/module_lambda_request_proof.tf
@@ -1,5 +1,5 @@
module "request_proof_lambda" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
diff --git a/infrastructure/terraform/modules/backend-api/module_lambda_set_letter_file_virus_scan_status_for_upload.tf b/infrastructure/terraform/modules/backend-api/module_lambda_set_letter_file_virus_scan_status_for_upload.tf
index 5ab6856ea..99dd4afb8 100644
--- a/infrastructure/terraform/modules/backend-api/module_lambda_set_letter_file_virus_scan_status_for_upload.tf
+++ b/infrastructure/terraform/modules/backend-api/module_lambda_set_letter_file_virus_scan_status_for_upload.tf
@@ -1,5 +1,5 @@
module "lambda_set_file_virus_scan_status_for_upload" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
diff --git a/infrastructure/terraform/modules/backend-api/module_lambda_sftp_poll.tf b/infrastructure/terraform/modules/backend-api/module_lambda_sftp_poll.tf
index 7d3c74dff..036d3e15d 100644
--- a/infrastructure/terraform/modules/backend-api/module_lambda_sftp_poll.tf
+++ b/infrastructure/terraform/modules/backend-api/module_lambda_sftp_poll.tf
@@ -1,5 +1,5 @@
module "lambda_sftp_poll" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
diff --git a/infrastructure/terraform/modules/backend-api/module_lambda_sftp_request_proof.tf b/infrastructure/terraform/modules/backend-api/module_lambda_sftp_request_proof.tf
index 7c474182c..237c8da21 100644
--- a/infrastructure/terraform/modules/backend-api/module_lambda_sftp_request_proof.tf
+++ b/infrastructure/terraform/modules/backend-api/module_lambda_sftp_request_proof.tf
@@ -1,5 +1,5 @@
module "lambda_sftp_request_proof" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
diff --git a/infrastructure/terraform/modules/backend-api/module_lambda_validate_letter_template_files.tf b/infrastructure/terraform/modules/backend-api/module_lambda_validate_letter_template_files.tf
index df733acc5..1c4a804e0 100644
--- a/infrastructure/terraform/modules/backend-api/module_lambda_validate_letter_template_files.tf
+++ b/infrastructure/terraform/modules/backend-api/module_lambda_validate_letter_template_files.tf
@@ -1,5 +1,5 @@
module "lambda_validate_letter_template_files" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
diff --git a/infrastructure/terraform/modules/backend-api/module_list_routing_configs_lambda.tf b/infrastructure/terraform/modules/backend-api/module_list_routing_configs_lambda.tf
index 75498a86d..1370278cd 100644
--- a/infrastructure/terraform/modules/backend-api/module_list_routing_configs_lambda.tf
+++ b/infrastructure/terraform/modules/backend-api/module_list_routing_configs_lambda.tf
@@ -1,5 +1,5 @@
module "list_routing_configs_lambda" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
diff --git a/infrastructure/terraform/modules/backend-api/module_list_template_lambda.tf b/infrastructure/terraform/modules/backend-api/module_list_template_lambda.tf
index 57aa6b1eb..409027b33 100644
--- a/infrastructure/terraform/modules/backend-api/module_list_template_lambda.tf
+++ b/infrastructure/terraform/modules/backend-api/module_list_template_lambda.tf
@@ -1,5 +1,5 @@
module "list_template_lambda" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
diff --git a/infrastructure/terraform/modules/backend-api/module_submit_routing_config_lambda.tf b/infrastructure/terraform/modules/backend-api/module_submit_routing_config_lambda.tf
index fc2c3eecc..9d00c7f0d 100644
--- a/infrastructure/terraform/modules/backend-api/module_submit_routing_config_lambda.tf
+++ b/infrastructure/terraform/modules/backend-api/module_submit_routing_config_lambda.tf
@@ -1,5 +1,5 @@
module "submit_routing_config_lambda" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
diff --git a/infrastructure/terraform/modules/backend-api/module_submit_template_lambda.tf b/infrastructure/terraform/modules/backend-api/module_submit_template_lambda.tf
index 259cc4819..67773a98f 100644
--- a/infrastructure/terraform/modules/backend-api/module_submit_template_lambda.tf
+++ b/infrastructure/terraform/modules/backend-api/module_submit_template_lambda.tf
@@ -1,5 +1,5 @@
module "submit_template_lambda" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
diff --git a/infrastructure/terraform/modules/backend-api/module_update_routing_config_lambda.tf b/infrastructure/terraform/modules/backend-api/module_update_routing_config_lambda.tf
index 51e70bb3c..75c8734ce 100644
--- a/infrastructure/terraform/modules/backend-api/module_update_routing_config_lambda.tf
+++ b/infrastructure/terraform/modules/backend-api/module_update_routing_config_lambda.tf
@@ -1,5 +1,5 @@
module "update_routing_config_lambda" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
diff --git a/infrastructure/terraform/modules/backend-api/module_update_template_lambda.tf b/infrastructure/terraform/modules/backend-api/module_update_template_lambda.tf
index 0fca9f060..9dce8cc68 100644
--- a/infrastructure/terraform/modules/backend-api/module_update_template_lambda.tf
+++ b/infrastructure/terraform/modules/backend-api/module_update_template_lambda.tf
@@ -1,5 +1,5 @@
module "update_template_lambda" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
diff --git a/infrastructure/terraform/modules/backend-api/module_upload_letter_template_lambda.tf b/infrastructure/terraform/modules/backend-api/module_upload_letter_template_lambda.tf
index efbb7f313..5fce83dc3 100644
--- a/infrastructure/terraform/modules/backend-api/module_upload_letter_template_lambda.tf
+++ b/infrastructure/terraform/modules/backend-api/module_upload_letter_template_lambda.tf
@@ -1,5 +1,5 @@
module "upload_letter_template_lambda" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
diff --git a/infrastructure/terraform/modules/backend-api/variables.tf b/infrastructure/terraform/modules/backend-api/variables.tf
index 68b441580..1c7c82ddc 100644
--- a/infrastructure/terraform/modules/backend-api/variables.tf
+++ b/infrastructure/terraform/modules/backend-api/variables.tf
@@ -105,6 +105,7 @@ variable "log_destination_arn" {
variable "send_to_firehose" {
type = bool
description = "Flag indicating whether logs should be sent to firehose"
+ default = true
}
variable "log_subscription_role_arn" {
diff --git a/infrastructure/terraform/modules/cognito-triggers/README.md b/infrastructure/terraform/modules/cognito-triggers/README.md
index 00d8d6d43..cd755863f 100644
--- a/infrastructure/terraform/modules/cognito-triggers/README.md
+++ b/infrastructure/terraform/modules/cognito-triggers/README.md
@@ -15,15 +15,18 @@ No requirements.
| [function\_s3\_bucket](#input\_function\_s3\_bucket) | Name of S3 bucket to upload lambda artefacts to | `string` | n/a | yes |
| [group](#input\_group) | The group variables are being inherited from (often synonmous with account short-name) | `string` | n/a | yes |
| [kms\_key\_arn](#input\_kms\_key\_arn) | KMS key ARN | `string` | n/a | yes |
+| [log\_destination\_arn](#input\_log\_destination\_arn) | Destination ARN to use for the log subscription filter | `string` | `""` | no |
| [log\_retention\_in\_days](#input\_log\_retention\_in\_days) | The retention period in days for the Cloudwatch Logs events to be retained, default of 0 is indefinite | `number` | `0` | no |
+| [log\_subscription\_role\_arn](#input\_log\_subscription\_role\_arn) | The ARN of the IAM role to use for the log subscription filter | `string` | `""` | no |
| [project](#input\_project) | The name of the tfscaffold project | `string` | n/a | yes |
| [region](#input\_region) | The AWS Region | `string` | n/a | yes |
+| [send\_to\_firehose](#input\_send\_to\_firehose) | Flag indicating whether logs should be sent to firehose | `bool` | `true` | no |
| [user\_pool\_id](#input\_user\_pool\_id) | ID of the Cognito user pool the triggers should be applied to | `string` | n/a | yes |
## Modules
| Name | Source | Version |
|------|--------|---------|
-| [pre\_authentication\_lambda](#module\_pre\_authentication\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
+| [pre\_authentication\_lambda](#module\_pre\_authentication\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
| [pre\_token\_generation\_lambda](#module\_pre\_token\_generation\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip | n/a |
## Outputs
diff --git a/infrastructure/terraform/modules/cognito-triggers/module_pre_authentication_lambda.tf b/infrastructure/terraform/modules/cognito-triggers/module_pre_authentication_lambda.tf
index 547bbcd5d..70e9c477b 100644
--- a/infrastructure/terraform/modules/cognito-triggers/module_pre_authentication_lambda.tf
+++ b/infrastructure/terraform/modules/cognito-triggers/module_pre_authentication_lambda.tf
@@ -1,5 +1,5 @@
module "pre_authentication_lambda" {
- source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.28/terraform-lambda.zip"
+ source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
project = var.project
environment = var.environment
@@ -23,6 +23,10 @@ module "pre_authentication_lambda" {
kms_key_arn = var.kms_key_arn
log_retention_in_days = var.log_retention_in_days
+ send_to_firehose = var.send_to_firehose
+ log_destination_arn = var.log_destination_arn
+ log_subscription_role_arn = var.log_subscription_role_arn
+
permission_statements = [{
statement_id = "AllowCognitoInvoke"
principal = "cognito-idp.amazonaws.com"
diff --git a/infrastructure/terraform/modules/cognito-triggers/module_pre_token_generation_lambda.tf b/infrastructure/terraform/modules/cognito-triggers/module_pre_token_generation_lambda.tf
index c9e107f2e..30c6656b0 100644
--- a/infrastructure/terraform/modules/cognito-triggers/module_pre_token_generation_lambda.tf
+++ b/infrastructure/terraform/modules/cognito-triggers/module_pre_token_generation_lambda.tf
@@ -23,6 +23,10 @@ module "pre_token_generation_lambda" {
kms_key_arn = var.kms_key_arn
log_retention_in_days = var.log_retention_in_days
+ send_to_firehose = var.send_to_firehose
+ log_destination_arn = var.log_destination_arn
+ log_subscription_role_arn = var.log_subscription_role_arn
+
permission_statements = [{
statement_id = "AllowCognitoInvoke"
principal = "cognito-idp.amazonaws.com"
diff --git a/infrastructure/terraform/modules/cognito-triggers/variables.tf b/infrastructure/terraform/modules/cognito-triggers/variables.tf
index da091247f..a11fd4d12 100644
--- a/infrastructure/terraform/modules/cognito-triggers/variables.tf
+++ b/infrastructure/terraform/modules/cognito-triggers/variables.tf
@@ -62,3 +62,21 @@ variable "user_pool_id" {
type = string
description = "ID of the Cognito user pool the triggers should be applied to"
}
+
+variable "log_destination_arn" {
+ type = string
+ description = "Destination ARN to use for the log subscription filter"
+ default = ""
+}
+
+variable "send_to_firehose" {
+ type = bool
+ description = "Flag indicating whether logs should be sent to firehose"
+ default = true
+}
+
+variable "log_subscription_role_arn" {
+ type = string
+ description = "The ARN of the IAM role to use for the log subscription filter"
+ default = ""
+}