Skip to content

Instantly share code, notes, and snippets.

@KyMidd
Created June 15, 2025 22:10
Show Gist options
  • Select an option

  • Save KyMidd/6fcd8ca75fc0218886a9d43cd7892091 to your computer and use it in GitHub Desktop.

Select an option

Save KyMidd/6fcd8ca75fc0218886a9d43cd7892091 to your computer and use it in GitHub Desktop.
locals {
# This is the name of the DynamoDB table
conversation_table_name = "VeraTeamsConversations"
}
resource "aws_dynamodb_table" "conversations" {
name = local.conversation_table_name
billing_mode = "PROVISIONED"
read_capacity = 20
write_capacity = 20
hash_key = "aadObjectId"
attribute {
name = "aadObjectId"
type = "S"
}
# Store entire conversation event as a JSON string with name conversationEvent
ttl {
attribute_name = "deleteAt" # Epoch time in seconds, needs to match token validity
enabled = true
}
tags = {
Name = local.conversation_table_name
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment