From 7abefb43aeb4cb3894b39a8aaec1fa5ca5efc6d5 Mon Sep 17 00:00:00 2001 From: martin-nhs <127403254+martin-nhs@users.noreply.github.com> Date: Fri, 1 Dec 2023 14:23:06 +0000 Subject: [PATCH] PRMT-4252-DYNAMODB (#111) * [PRMT-4252-DYNAMODB] Added `deletion_protection_enabled = true`, confirmed point_in_time_recovery is enabled. * [PRMT-4252-DYNAMODB] Run a `terraform fmt`. --- terraform/dynamodb.tf | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/terraform/dynamodb.tf b/terraform/dynamodb.tf index bb634df3e..8a61283b1 100644 --- a/terraform/dynamodb.tf +++ b/terraform/dynamodb.tf @@ -1,7 +1,8 @@ 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 { enabled = true @@ -28,15 +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" } - }