Skip to content

Commit 7554e52

Browse files
committed
add try to default_letter_supplier
1 parent 46609ac commit 7554e52

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ locals {
3434

3535
use_sftp_letter_supplier_mock = lookup(var.letter_suppliers, local.mock_letter_supplier_name, null) != null
3636

37-
default_letter_supplier = [
37+
default_letter_supplier = try([
3838
for k, v in var.letter_suppliers : merge(v, { name = k }) if v.default_supplier
39-
][0]
39+
][0], null)
4040

4141
sftp_environment = "${var.group}-${var.environment}-${var.component}"
4242
}

lambdas/sftp-letters/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Sending proof requests
2+
3+
The `send-proof` lambda within this package is a component in a system for sending files to letter suppliers within the ['NHS Notify Letters CSV SFTP integration protocol'](https://nhsd-confluence.digital.nhs.uk/spaces/RIS/pages/832041921/NHS+Notify+Letters+CSV+SFTP+integration+protocol) system.
4+
5+
The files give the printer what they need to set up the template layout in their system, provide a record of the personalisation fields belonging to the template, and contain specific example personalisation from which the printer produces proof PDFs in response.
6+
7+
Those files are:
8+
- A [PDF](https://nhsd-confluence.digital.nhs.uk/spaces/RIS/pages/832041921/NHS+Notify+Letters+CSV+SFTP+integration+protocol#NHSNotify%7CLettersCSVSFTPintegrationprotocol-NHSNotify%3ARequestingsetupofanewtemplate) which represents a letter layout. Dynamic text segments are included using `((param))` sytax, where 'param' corresponds to the personalisation key.
9+
- A [batch file](https://nhsd-confluence.digital.nhs.uk/spaces/RIS/pages/832041921/NHS+Notify+Letters+CSV+SFTP+integration+protocol#NHSNotify%7CLettersCSVSFTPintegrationprotocol-Batchfileformat) whose format matches (to a large extent) the format of real batches sent to the printer in production by the NHS Notify core system. This synthetic batch contains a row of personalisation for each proof which we are requesting from the printer.
10+
- A [manifest](https://nhsd-confluence.digital.nhs.uk/spaces/RIS/pages/832041921/NHS+Notify+Letters+CSV+SFTP+integration+protocol#NHSNotify%7CLettersCSVSFTPintegrationprotocol-Manifestfileformat), which accompanines the batch. It being uploaded signals to the printer that the batch file is ready for processing.

0 commit comments

Comments
 (0)