Skip to content

Commit 3c463f7

Browse files
authored
[NDR-422] Change CORE db structure (#623)
1 parent 89837ef commit 3c463f7

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

infrastructure/dynamo_db.tf

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,7 @@ module "pdm_dynamodb_table" {
492492
module "core_dynamodb_table" {
493493
source = "./modules/dynamo_db"
494494
table_name = var.core_dynamodb_table_name
495-
hash_key = "NhsNumber"
496-
sort_key = "ID"
495+
hash_key = "ID"
497496
deletion_protection_enabled = var.deletion_protection_enabled
498497
stream_view_type = "OLD_IMAGE"
499498
ttl_enabled = true
@@ -508,15 +507,11 @@ module "core_dynamodb_table" {
508507
name = "NhsNumber"
509508
type = "S"
510509
},
511-
{
512-
name = "DocumentSnomedCodeType"
513-
type = "S"
514-
}
515510
]
516511
global_secondary_indexes = [
517512
{
518-
name = "idx_gsi_snomed_code"
519-
hash_key = "DocumentSnomedCodeType"
513+
name = "idx_gsi_nhs_number"
514+
hash_key = "NhsNumber"
520515
range_key = "ID"
521516
projection_type = "ALL"
522517
}
@@ -634,4 +629,5 @@ module "user_restriction_table" {
634629

635630
environment = var.environment
636631
owner = var.owner
637-
}
632+
}
633+

0 commit comments

Comments
 (0)