Skip to content

Commit eed6694

Browse files
Supplier Config table
1 parent 3288163 commit eed6694

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
resource "aws_dynamodb_table" "supplier-configuration" {
2+
name = "${local.csi}-supplier-config"
3+
billing_mode = "PAY_PER_REQUEST"
4+
5+
hash_key = "variantId"
6+
range_key = "id"
7+
8+
ttl {
9+
attribute_name = "ttl"
10+
enabled = true
11+
}
12+
13+
attribute {
14+
name = "variantId"
15+
type = "S"
16+
}
17+
18+
attribute {
19+
name = "id"
20+
type = "S"
21+
}
22+
23+
attribute {
24+
name = "type"
25+
type = "S"
26+
}
27+
// The type-index GSI allows us to query for all supplier configurations of a given type (e.g. all letter supplier configurations)
28+
global_secondary_index {
29+
name = "type-index"
30+
hash_key = "type"
31+
range_key = "id"
32+
projection_type = "ALL"
33+
}
34+
35+
point_in_time_recovery {
36+
enabled = true
37+
}
38+
39+
tags = merge(
40+
local.default_tags,
41+
{
42+
NHSE-Enable-Dynamo-Backup-Acct = "True"
43+
}
44+
)
45+
46+
}

0 commit comments

Comments
 (0)