Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3403172
D10153.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D10153.diff
View Options
diff --git a/services/terraform/modules/shared/dynamodb.tf b/services/terraform/modules/shared/dynamodb.tf
--- a/services/terraform/modules/shared/dynamodb.tf
+++ b/services/terraform/modules/shared/dynamodb.tf
@@ -139,6 +139,37 @@
}
}
+resource "aws_dynamodb_table" "identity-devices" {
+ name = "identity-devices"
+ hash_key = "userID"
+ range_key = "itemID"
+ billing_mode = "PAY_PER_REQUEST"
+
+ attribute {
+ name = "userID"
+ type = "S"
+ }
+
+ # this is either device ID or device list datetime
+ attribute {
+ name = "itemID"
+ type = "S"
+ }
+
+ # only for sorting device lists
+ attribute {
+ name = "timestamp"
+ type = "N"
+ }
+
+ # sparse index allowing to sort device list updates by timestamp
+ local_secondary_index {
+ name = "deviceList-timestamp-index"
+ range_key = "timestamp"
+ projection_type = "ALL"
+ }
+}
+
# Identity users with opaque_ke 2.0 credentials
resource "aws_dynamodb_table" "identity-users-opaque2" {
# This table doesnt exist in prod
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 4, 1:47 AM (5 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2610117
Default Alt Text
D10153.diff (1 KB)
Attached To
Mode
D10153: [terraform] Create table for devices
Attached
Detach File
Event Timeline
Log In to Comment