Skip to content

Commit

Permalink
Create dynamodb.tf
Browse files Browse the repository at this point in the history
Testing PR changes with config file exclusions
  • Loading branch information
bahar-shah authored Feb 26, 2025
1 parent d6c9865 commit cc364b3
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions terraform/dynamodb.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
resource "aws_dynamodb_table" "basic-dynamodb-table" {
name = "GameScores"
billing_mode = "PROVISIONED"
read_capacity = 20
write_capacity = 20
hash_key = "UserId"
range_key = "GameTitle"

point_in_time_recovery {
enabled = false
}

attribute {
name = "UserId"
type = "S"
}

attribute {
name = "GameTitle"
type = "S"
}

attribute {
name = "TopScore"
type = "N"
}

ttl {
attribute_name = "TimeToExist"
enabled = false
}

global_secondary_index {
name = "GameTitleIndex"
hash_key = "GameTitle"
range_key = "TopScore"
write_capacity = 10
read_capacity = 10
projection_type = "INCLUDE"
non_key_attributes = ["UserId"]
}

tags = {
Name = "dynamodb-table-1"
Environment = "production"
}
}

0 comments on commit cc364b3

Please sign in to comment.