Skip to content

Commit c1d649b

Browse files
authored
VED-000 (NOJIRA) Add an index for searching Delta table on the immunisation ID (#906)
1 parent c4f4ed1 commit c1d649b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

terraform/dynamodb.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ resource "aws_dynamodb_table" "delta-dynamodb-table" {
6868
type = "S"
6969
}
7070

71+
attribute {
72+
name = "ImmsID"
73+
type = "S"
74+
}
75+
7176
attribute {
7277
name = "Operation"
7378
type = "S"
@@ -102,6 +107,12 @@ resource "aws_dynamodb_table" "delta-dynamodb-table" {
102107
projection_type = "ALL"
103108
}
104109

110+
global_secondary_index {
111+
name = "ImmunisationIdIndex"
112+
hash_key = "ImmsID"
113+
projection_type = "ALL"
114+
}
115+
105116
point_in_time_recovery {
106117
enabled = var.environment == "prod"
107118
}

0 commit comments

Comments
 (0)