Skip to content

Commit eb8fce5

Browse files
authored
Add DynamoDB table resource for events RSVP (#434)
1 parent 9d41592 commit eb8fce5

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

terraform/modules/dynamo/main.tf

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,3 +567,36 @@ resource "aws_dynamodb_table" "store_limits" {
567567
}
568568
}
569569
}
570+
571+
resource "aws_dynamodb_table" "events_rsvp" {
572+
region = "us-east-2"
573+
billing_mode = "PAY_PER_REQUEST"
574+
name = "${var.ProjectId}-events-rsvp"
575+
deletion_protection_enabled = true
576+
hash_key = "partitionKey"
577+
point_in_time_recovery {
578+
enabled = true
579+
}
580+
attribute {
581+
name = "partitionKey"
582+
type = "S"
583+
}
584+
attribute {
585+
name = "eventId"
586+
type = "S"
587+
}
588+
global_secondary_index {
589+
name = "EventIdIndex"
590+
hash_key = "eventId"
591+
projection_type = "ALL"
592+
}
593+
stream_enabled = true
594+
stream_view_type = "NEW_AND_OLD_IMAGES"
595+
dynamic "replica" {
596+
for_each = var.ReplicationRegions
597+
content {
598+
region_name = replica.value
599+
deletion_protection_enabled = true
600+
}
601+
}
602+
}

0 commit comments

Comments
 (0)