[terraform] Create table for devices
Summary:
ENG-5116.
Created a table for devices and device lists as designed in the linked Linear task.
Also added a separate LSI (local secondary index) for device list timestamps, which improves performance of very frequent query: "Get all user's device list updates since given timestamp".
The itemID column is either device-${deviceID} or devicelist-${datetime}. The timestamp is a separate column present only for device-list items. It contains duplicated timestamp only for the sake of aforementioned LSI.
Test Plan:
Initialized localstack and used aws-cli to ensure the table is created as expected.
awslocal dynamodb list-tables awslocal dynamodb describe-table --table-name identity-devices
Reviewers: varun, michal
Reviewed By: varun
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D10153