diff --git a/terraform/dynamodb.tf b/terraform/dynamodb.tf index 5bf01ae20..22d60dcb7 100644 --- a/terraform/dynamodb.tf +++ b/terraform/dynamodb.tf @@ -68,6 +68,11 @@ resource "aws_dynamodb_table" "delta-dynamodb-table" { type = "S" } + attribute { + name = "ImmsID" + type = "S" + } + attribute { name = "Operation" type = "S" @@ -102,6 +107,12 @@ resource "aws_dynamodb_table" "delta-dynamodb-table" { projection_type = "ALL" } + global_secondary_index { + name = "ImmunisationIdIndex" + hash_key = "ImmsID" + projection_type = "ALL" + } + point_in_time_recovery { enabled = var.environment == "prod" }