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 @@ -118,6 +118,11 @@ type = "S" } + attribute { + name = "farcasterID" + type = "S" + } + global_secondary_index { name = "username-index" hash_key = "username" @@ -129,6 +134,13 @@ hash_key = "walletAddress" projection_type = "KEYS_ONLY" } + + global_secondary_index { + name = "farcasterID-index" + hash_key = "farcasterID" + projection_type = "INCLUDE" + non_key_attributes = ["walletAddress", "username"] + } } resource "aws_dynamodb_table" "identity-devices" {