Skip to content

Commit 32ed19e

Browse files
committed
Merge branch 'main' into feature/CCM-7939_templates-event-stream
2 parents 72fb30f + 894a454 commit 32ed19e

21 files changed

+25
-98
lines changed

frontend/src/__tests__/utils/markdownit/__snapshots__/index.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ exports[`renderEmailMarkdown should only process email markdown rules 1`] = `
1212
<li>ordered list item 1</li>
1313
<li>ordered list item 2</li>
1414
</ol>
15-
<p><a href="https://www.nhs.uk/example">Read more</a></p>
15+
<p><a href="https://www.nhs.uk/example" target="_blank" rel="noopener noreferrer">Read more</a></p>
1616
<p>https://www.nhs.uk/example</p>
1717
<p>Before page break</p>
1818
<hr>
@@ -38,7 +38,7 @@ exports[`renderNHSAppMarkdown should only process nhs app markdown rules 1`] = `
3838
<li>ordered list item 1</li>
3939
<li>ordered list item 2</li>
4040
</ol>
41-
<p><a href="https://www.nhs.uk/example">Read more</a></p>
41+
<p><a href="https://www.nhs.uk/example" target="_blank" rel="noopener noreferrer">Read more</a></p>
4242
<p>https://www.nhs.uk/example</p>
4343
<p>Before page break
4444
***

frontend/src/utils/markdownit/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ import { lineBreak } from './plugins/line-break';
44
export class MarkdownItWrapper extends MarkdownIt {
55
constructor() {
66
super('zero');
7+
8+
// rendered links should open in a new tab
9+
this.renderer.rules.link_open = (tokens, idx) => {
10+
const href = tokens[idx].attrGet('href');
11+
12+
return `<a href="${href}" target="_blank" rel="noopener noreferrer">`;
13+
};
714
}
815

916
/**

infrastructure/terraform/components/sandbox/module_backend_api.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ module "backend_api" {
2121
letter_suppliers = var.letter_suppliers
2222

2323
kms_key_arn = data.aws_kms_key.sandbox.arn
24-
dynamodb_kms_key_arn = data.aws_kms_key.sandbox.arn
2524

2625
send_to_firehose = false
2726

infrastructure/terraform/modules/backend-api/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ No requirements.
1414
| <a name="input_cognito_config"></a> [cognito\_config](#input\_cognito\_config) | Cognito config | <pre>object({<br/> USER_POOL_ID : string,<br/> USER_POOL_CLIENT_ID : string<br/> })</pre> | n/a | yes |
1515
| <a name="input_component"></a> [component](#input\_component) | The variable encapsulating the name of this component | `string` | n/a | yes |
1616
| <a name="input_csi"></a> [csi](#input\_csi) | CSI from the parent component | `string` | n/a | yes |
17-
| <a name="input_dynamodb_kms_key_arn"></a> [dynamodb\_kms\_key\_arn](#input\_dynamodb\_kms\_key\_arn) | KMS Key ARN for encrypting DynamoDB data. If not given, a key will be created. | `string` | `""` | no |
1817
| <a name="input_enable_backup"></a> [enable\_backup](#input\_enable\_backup) | Enable Backups for the DynamoDB table? | `bool` | `true` | no |
1918
| <a name="input_enable_event_stream"></a> [enable\_event\_stream](#input\_enable\_event\_stream) | Enable DynamoDB streaming to SQS? | `bool` | `false` | no |
2019
| <a name="input_enable_proofing"></a> [enable\_proofing](#input\_enable\_proofing) | Enable proofing feature flag | `bool` | n/a | yes |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ resource "aws_dynamodb_table" "templates" {
2626

2727
server_side_encryption {
2828
enabled = true
29-
kms_key_arn = local.dynamodb_kms_key_arn
29+
kms_key_arn = var.kms_key_arn
3030
}
3131

3232
tags = {

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

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

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ locals {
5050
ENABLE_PROOFING = var.enable_proofing
5151
}
5252

53-
dynamodb_kms_key_arn = var.dynamodb_kms_key_arn == "" ? aws_kms_key.dynamo[0].arn : var.dynamodb_kms_key_arn
54-
5553
mock_letter_supplier_name = "WTMMOCK"
5654

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

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ data "aws_iam_policy_document" "create_letter_template_lambda_policy" {
6262
]
6363

6464
resources = [
65-
local.dynamodb_kms_key_arn,
6665
var.kms_key_arn
6766
]
6867
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ data "aws_iam_policy_document" "create_template_lambda_policy" {
6161
]
6262

6363
resources = [
64-
local.dynamodb_kms_key_arn
64+
var.kms_key_arn
6565
]
6666
}
6767
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ data "aws_iam_policy_document" "delete_template_lambda_policy" {
6161
]
6262

6363
resources = [
64-
local.dynamodb_kms_key_arn
64+
var.kms_key_arn
6565
]
6666
}
6767
}

0 commit comments

Comments
 (0)