Skip to content

Commit bbe3bc8

Browse files
CCM-12858: addressing review comments
1 parent 968536e commit bbe3bc8

5 files changed

Lines changed: 13 additions & 38 deletions

File tree

infrastructure/terraform/components/dl/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ No requirements.
1111
|------|-------------|------|---------|:--------:|
1212
| <a name="input_apim_auth_token_schedule"></a> [apim\_auth\_token\_schedule](#input\_apim\_auth\_token\_schedule) | Schedule to renew the APIM auth token | `string` | `"rate(9 minutes)"` | no |
1313
| <a name="input_apim_auth_token_url"></a> [apim\_auth\_token\_url](#input\_apim\_auth\_token\_url) | URL to generate an APIM auth token | `string` | `"https://int.api.service.nhs.uk/oauth2/token"` | no |
14-
| <a name="input_apim_base_url"></a> [apim\_base\_url](#input\_apim\_base\_url) | The URL used to send requests to Notify and PDM | `string` | `"https://int.api.service.nhs.uk"` | no |
14+
| <a name="input_apim_base_url"></a> [apim\_base\_url](#input\_apim\_base\_url) | The URL used to send requests to PDM | `string` | `"https://int.api.service.nhs.uk"` | no |
1515
| <a name="input_apim_keygen_schedule"></a> [apim\_keygen\_schedule](#input\_apim\_keygen\_schedule) | Schedule to refresh key pairs if necessary | `string` | `"cron(0 14 * * ? *)"` | no |
1616
| <a name="input_aws_account_id"></a> [aws\_account\_id](#input\_aws\_account\_id) | The AWS Account ID (numeric) | `string` | n/a | yes |
1717
| <a name="input_component"></a> [component](#input\_component) | The variable encapsulating the name of this component | `string` | `"dl"` | no |
18-
| <a name="input_core_notify_sandbox_base_url"></a> [core\_notify\_sandbox\_base\_url](#input\_core\_notify\_sandbox\_base\_url) | The URL used to send requests to Notify sandbox environment (should not be used in production environment) | `string` | `"https://sandbox.api.service.nhs.uk"` | no |
18+
| <a name="input_core_notify_url"></a> [core\_notify\_url](#input\_core\_notify\_url) | The URL used to send requests to Notify | `string` | `"https://sandbox.api.service.nhs.uk"` | no |
1919
| <a name="input_default_tags"></a> [default\_tags](#input\_default\_tags) | A map of default tags to apply to all taggable resources within the component | `map(string)` | `{}` | no |
2020
| <a name="input_enable_dynamodb_delete_protection"></a> [enable\_dynamodb\_delete\_protection](#input\_enable\_dynamodb\_delete\_protection) | Enable DynamoDB Delete Protection on all Tables | `bool` | `true` | no |
2121
| <a name="input_enable_pdm_mock"></a> [enable\_pdm\_mock](#input\_enable\_pdm\_mock) | Flag indicating whether to deploy PDM mock API (should be false in production environments) | `bool` | `true` | no |
@@ -36,12 +36,11 @@ No requirements.
3636
| <a name="input_region"></a> [region](#input\_region) | The AWS Region | `string` | n/a | yes |
3737
| <a name="input_shared_infra_account_id"></a> [shared\_infra\_account\_id](#input\_shared\_infra\_account\_id) | The AWS Shared Infra Account ID (numeric) | `string` | n/a | yes |
3838
| <a name="input_ttl_poll_schedule"></a> [ttl\_poll\_schedule](#input\_ttl\_poll\_schedule) | Schedule to poll for any overdue TTL records | `string` | `"rate(10 minutes)"` | no |
39-
| <a name="input_use_core_nofiy_sandbox"></a> [use\_core\_nofiy\_sandbox](#input\_use\_core\_nofiy\_sandbox) | Flag indicating whether to use Core Notify sandbox or not (should be false in production environments) | `bool` | `true` | no |
4039
## Modules
4140

4241
| Name | Source | Version |
4342
|------|--------|---------|
44-
| <a name="module_core_notifier"></a> [core\_notifier](#module\_core\_notifier) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.24/terraform-lambda.zip | n/a |
43+
| <a name="module_core_notifier"></a> [core\_notifier](#module\_core\_notifier) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
4544
| <a name="module_kms"></a> [kms](#module\_kms) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.24/terraform-kms.zip | n/a |
4645
| <a name="module_lambda_apim_key_generation"></a> [lambda\_apim\_key\_generation](#module\_lambda\_apim\_key\_generation) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
4746
| <a name="module_lambda_lambda_apim_refresh_token"></a> [lambda\_lambda\_apim\_refresh\_token](#module\_lambda\_lambda\_apim\_refresh\_token) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
@@ -53,7 +52,6 @@ No requirements.
5352
| <a name="module_s3bucket_letters"></a> [s3bucket\_letters](#module\_s3bucket\_letters) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.24/terraform-s3bucket.zip | n/a |
5453
| <a name="module_s3bucket_static_assets"></a> [s3bucket\_static\_assets](#module\_s3bucket\_static\_assets) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.24/terraform-s3bucket.zip | n/a |
5554
| <a name="module_sqs_core_notifier"></a> [sqs\_core\_notifier](#module\_sqs\_core\_notifier) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.24/terraform-sqs.zip | n/a |
56-
| <a name="module_sqs_core_notifier_errors"></a> [sqs\_core\_notifier\_errors](#module\_sqs\_core\_notifier\_errors) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.24/terraform-sqs.zip | n/a |
5755
| <a name="module_sqs_event_publisher_errors"></a> [sqs\_event\_publisher\_errors](#module\_sqs\_event\_publisher\_errors) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.24/terraform-sqs.zip | n/a |
5856
| <a name="module_sqs_pdm_poll"></a> [sqs\_pdm\_poll](#module\_sqs\_pdm\_poll) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.24/terraform-sqs.zip | n/a |
5957
| <a name="module_sqs_pdm_uploader"></a> [sqs\_pdm\_uploader](#module\_sqs\_pdm\_uploader) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.24/terraform-sqs.zip | n/a |

infrastructure/terraform/components/dl/module_lambda_core_notifier.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module "core_notifier" {
2-
source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.24/terraform-lambda.zip"
2+
source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip"
33

44
function_name = "core-notifier"
55
description = "A function to send messages to core Notify when a PDM resource is available"
@@ -31,12 +31,11 @@ module "core_notifier" {
3131
force_lambda_code_deploy = var.force_lambda_code_deploy
3232
enable_lambda_insights = false
3333

34-
send_to_firehose = true
3534
log_destination_arn = local.log_destination_arn
3635
log_subscription_role_arn = local.acct.log_subscription_role_arn
3736

3837
lambda_env_vars = {
39-
"APIM_BASE_URL" = var.use_core_nofiy_sandbox ? var.core_notify_sandbox_base_url : var.apim_base_url
38+
"APIM_BASE_URL" = var.core_notify_url
4039
"APIM_ACCESS_TOKEN_SSM_PARAMETER_NAME" = local.apim_access_token_ssm_parameter_name
4140
"EVENT_PUBLISHER_EVENT_BUS_ARN" = aws_cloudwatch_event_bus.main.arn
4241
"EVENT_PUBLISHER_DLQ_URL" = module.sqs_event_publisher_errors.sqs_queue_url

infrastructure/terraform/components/dl/module_sqs_core_notifier_errors.tf

Lines changed: 0 additions & 14 deletions
This file was deleted.

infrastructure/terraform/components/dl/variables.tf

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,17 @@ variable "pdm_use_non_mock_token" {
130130

131131
variable "apim_base_url" {
132132
type = string
133-
description = "The URL used to send requests to Notify and PDM"
133+
description = "The URL used to send requests to PDM"
134134
default = "https://int.api.service.nhs.uk"
135135
}
136136

137+
138+
variable "core_notify_url" {
139+
type = string
140+
description = "The URL used to send requests to Notify"
141+
default = "https://sandbox.api.service.nhs.uk"
142+
}
143+
137144
variable "apim_auth_token_url" {
138145
type = string
139146
description = "URL to generate an APIM auth token"
@@ -163,15 +170,3 @@ variable "enable_pdm_mock" {
163170
description = "Flag indicating whether to deploy PDM mock API (should be false in production environments)"
164171
default = true
165172
}
166-
167-
variable "use_core_nofiy_sandbox" {
168-
type = bool
169-
description = "Flag indicating whether to use Core Notify sandbox or not (should be false in production environments)"
170-
default = true
171-
}
172-
173-
variable "core_notify_sandbox_base_url" {
174-
type = string
175-
description = "The URL used to send requests to Notify sandbox environment (should not be used in production environment)"
176-
default = "https://sandbox.api.service.nhs.uk"
177-
}

tests/playwright/digital-letters-component-tests/core-notify.component.spec.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ const baseEvent: Omit<PDMResourceAvailable, 'id' | 'data'> = {
3838
};
3939

4040
test.describe('Digital Letters - Core Notify', () => {
41-
const handleCoreNotifierDlqName = `${CSI}-core-notifier-errors-queue`;
4241
const parameterStore = new ParameterStoreCache();
4342
const senderManagement = SenderManagement({
4443
parameterStore,
@@ -53,7 +52,6 @@ test.describe('Digital Letters - Core Notify', () => {
5352
}
5453

5554
test.beforeAll(async () => {
56-
await purgeQueue(handleCoreNotifierDlqName);
5755
await purgeQueue(CORE_NOTIFIER_DLQ_NAME);
5856
test.setTimeout(250_000);
5957

@@ -86,7 +84,6 @@ test.describe('Digital Letters - Core Notify', () => {
8684
});
8785

8886
test.afterAll(async () => {
89-
await purgeQueue(handleCoreNotifierDlqName);
9087
await purgeQueue(CORE_NOTIFIER_DLQ_NAME);
9188
await deleteSendersIfExist();
9289
});

0 commit comments

Comments
 (0)