-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdynamo.tf
59 lines (52 loc) · 1.24 KB
/
dynamo.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
locals {
ehr_transfer_tracker_db_name = "${var.environment}-ehr-transfer-tracker"
}
module "ehr_transfer_tracker_dynamodb_table" {
source = "terraform-aws-modules/dynamodb-table/aws"
version = "4.0.0"
name = local.ehr_transfer_tracker_db_name
hash_key = "InboundConversationId"
range_key = "Layer"
global_secondary_indexes = [
{
name = "NhsNumberSecondaryIndex"
hash_key = "NhsNumber"
projection_type = "ALL"
},
{
name = "OutboundConversationIdSecondaryIndex"
hash_key = "OutboundConversationId"
projection_type = "ALL"
}
]
attributes = [
{
"name" : "InboundConversationId",
"type" : "S"
},
{
"name" : "Layer",
"type" : "S"
},
{
"name" : "NhsNumber",
"type" : "S"
},
{
"name" : "OutboundConversationId",
"type" : "S"
}
]
deletion_protection_enabled = true
point_in_time_recovery_enabled = true
server_side_encryption_enabled = true
ttl_attribute_name = "DeletedAt"
ttl_enabled = true
stream_enabled = true
stream_view_type = "OLD_IMAGE"
tags = {
Terraform = "true"
CreatedBy = var.repo_name
Environment = var.environment
}
}