Skip to content

Commit 1322c1e

Browse files
authored
CCM-11162: routing config table (#649)
1 parent dce6c60 commit 1322c1e

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
resource "aws_dynamodb_table" "routing_configuration" {
2+
name = "${local.csi}-routing-configuration"
3+
billing_mode = "PAY_PER_REQUEST"
4+
5+
hash_key = "owner"
6+
range_key = "id"
7+
8+
attribute {
9+
name = "owner"
10+
type = "S"
11+
}
12+
13+
attribute {
14+
name = "id"
15+
type = "S"
16+
}
17+
18+
ttl {
19+
attribute_name = "ttl"
20+
enabled = true
21+
}
22+
23+
point_in_time_recovery {
24+
enabled = true
25+
}
26+
27+
server_side_encryption {
28+
enabled = true
29+
kms_key_arn = var.kms_key_arn
30+
}
31+
32+
tags = {
33+
"NHSE-Enable-Dynamo-Backup" = var.enable_backup ? "True" : "False"
34+
}
35+
36+
lifecycle {
37+
ignore_changes = [
38+
name, # To support backup and restore which will result in a new name otherwise
39+
]
40+
}
41+
42+
global_secondary_index {
43+
name = "QueryById"
44+
hash_key = "id"
45+
projection_type = "KEYS_ONLY"
46+
}
47+
48+
stream_enabled = true
49+
stream_view_type = "NEW_AND_OLD_IMAGES"
50+
}

0 commit comments

Comments
 (0)