From 509cdff090fbeccb0e6b812a268266c7eacee90b Mon Sep 17 00:00:00 2001 From: martin-nhs Date: Fri, 1 Dec 2023 10:42:01 +0000 Subject: [PATCH 1/2] [PRMT-4252-DYNAMODB] Added `deletion_protection_enabled = true`, confirmed point_in_time_recovery is enabled. --- terraform/dynamodb.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/dynamodb.tf b/terraform/dynamodb.tf index bb634df3e..8d99a02c0 100644 --- a/terraform/dynamodb.tf +++ b/terraform/dynamodb.tf @@ -2,6 +2,7 @@ resource "aws_dynamodb_table" "transfer_tracker" { name = "${var.environment}-${var.component_name}-transfer-tracker" billing_mode = "PAY_PER_REQUEST" hash_key = "conversation_id" + deletion_protection_enabled = true server_side_encryption { enabled = true @@ -38,5 +39,4 @@ resource "aws_dynamodb_table" "transfer_tracker" { hash_key = "is_active" projection_type = "ALL" } - } From 3ead3b2610ffca1672f19250d74d33a95a20d1c6 Mon Sep 17 00:00:00 2001 From: martin-nhs Date: Fri, 1 Dec 2023 10:44:32 +0000 Subject: [PATCH 2/2] [PRMT-4252-DYNAMODB] Run a `terraform fmt`. --- terraform/dynamodb.tf | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/terraform/dynamodb.tf b/terraform/dynamodb.tf index 8d99a02c0..8a61283b1 100644 --- a/terraform/dynamodb.tf +++ b/terraform/dynamodb.tf @@ -1,7 +1,7 @@ resource "aws_dynamodb_table" "transfer_tracker" { - name = "${var.environment}-${var.component_name}-transfer-tracker" - billing_mode = "PAY_PER_REQUEST" - hash_key = "conversation_id" + name = "${var.environment}-${var.component_name}-transfer-tracker" + billing_mode = "PAY_PER_REQUEST" + hash_key = "conversation_id" deletion_protection_enabled = true server_side_encryption { @@ -29,14 +29,14 @@ resource "aws_dynamodb_table" "transfer_tracker" { } global_secondary_index { - name = "NhsNumberSecondaryIndex" - hash_key = "nhs_number" - projection_type = "ALL" + name = "NhsNumberSecondaryIndex" + hash_key = "nhs_number" + projection_type = "ALL" } global_secondary_index { - name = "IsActiveSecondaryIndex" - hash_key = "is_active" - projection_type = "ALL" + name = "IsActiveSecondaryIndex" + hash_key = "is_active" + projection_type = "ALL" } }