Skip to content

Commit 5a5a21b

Browse files
committed
CCM-11442: Add TTL fields to ddb config
1 parent 6fa4c68 commit 5a5a21b

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

infrastructure/terraform/components/api/ddb_table_letters.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ resource "aws_dynamodb_table" "letters" {
55
hash_key = "supplierId"
66
range_key = "id"
77

8+
ttl {
9+
attribute_name = "ttl"
10+
enabled = true
11+
}
12+
813
global_secondary_index {
914
name = "supplierStatus-index"
1015
hash_key = "supplierStatus"
@@ -27,6 +32,11 @@ resource "aws_dynamodb_table" "letters" {
2732
type = "string"
2833
}
2934

35+
attribute {
36+
name = "ttl"
37+
type = "number"
38+
}
39+
3040
point_in_time_recovery {
3141
enabled = true
3242
}

infrastructure/terraform/components/api/ddb_table_mi.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ resource "aws_dynamodb_table" "mi" {
55
hash_key = "supplierId"
66
range_key = "id"
77

8+
ttl {
9+
attribute_name = "ttl"
10+
enabled = true
11+
}
12+
813
attribute {
914
name = "id"
1015
type = "string"
@@ -15,6 +20,11 @@ resource "aws_dynamodb_table" "mi" {
1520
type = "string"
1621
}
1722

23+
attribute {
24+
name = "ttl"
25+
type = "number"
26+
}
27+
1828
point_in_time_recovery {
1929
enabled = true
2030
}

0 commit comments

Comments
 (0)