Skip to content

Commit 72bb95e

Browse files
committed
Adds unstitched dynamo table and permissions for it
1 parent 9c48bc7 commit 72bb95e

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

infrastructure/dynamo_db.tf

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,33 @@ module "lloyd_george_reference_dynamodb_table" {
8787
type = "S"
8888
}
8989
]
90+
}
91+
92+
module "lloyd_george_unstitched_reference_dynamodb_table" {
93+
source = "./modules/dynamo_db"
94+
table_name = var.lloyd_george_unstitched_dynamodb_table_name
95+
hash_key = "ID"
96+
deletion_protection_enabled = local.is_production
97+
stream_enabled = true
98+
stream_view_type = "OLD_IMAGE"
99+
ttl_enabled = true
100+
ttl_attribute_name = "TTL"
101+
point_in_time_recovery_enabled = !local.is_sandbox
102+
103+
attributes = [
104+
{
105+
name = "ID"
106+
type = "S"
107+
},
108+
{
109+
name = "FileLocation"
110+
type = "S"
111+
},
112+
{
113+
name = "NhsNumber"
114+
type = "S"
115+
}
116+
]
90117

91118
global_secondary_indexes = [
92119
{

infrastructure/lambda-pdf-stitching.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ module "pdf-stitching-lambda" {
99
module.sqs-nrl-queue.sqs_write_policy_document,
1010
module.sqs-stitching-queue.sqs_write_policy_document,
1111
module.sqs-stitching-queue.sqs_read_policy_document
12+
module.lloyd_george_unstitched_reference_dynamodb_table.dynamodb_write_policy
1213
]
1314
rest_api_id = null
1415
api_execution_arn = null

infrastructure/variable.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ variable "lloyd_george_dynamodb_table_name" {
6060
default = "LloydGeorgeReferenceMetadata"
6161
}
6262

63+
variable "lloyd_george_unstitched_dynamodb_table_name" {
64+
type = string
65+
description = "The name of dynamodb table to store the unstitched metadata of Lloyd George documents"
66+
default = "UnstitchedLloydGeorgeReferenceMetadata"
67+
}
68+
6369
variable "cloudfront_edge_table_name" {
6470
type = string
6571
description = "The name of dynamodb table to store the presigned url reference of CloudFront requests"

0 commit comments

Comments
 (0)