Created
June 14, 2022 04:40
-
-
Save cromyhector/3b0e411817afd8fde82fee41acc3897e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### --- dynamodb/resources.tf --- | |
resource "aws_dynamodb_table" "sneakers_table" { | |
name = var.table_name | |
read_capacity = 20 | |
write_capacity = 20 | |
hash_key = "BrandName" | |
range_key = "ModelNumber" | |
attribute { | |
name = "BrandName" | |
type = "S" | |
} | |
attribute { | |
name = "ModelNumber" | |
type = "N" | |
} | |
ttl { | |
attribute_name = "TimeToExist" | |
enabled = false | |
} | |
global_secondary_index { | |
name = "Sneakers_GSI" | |
hash_key = "BrandName" | |
range_key = "ModelNumber" | |
write_capacity = 10 | |
read_capacity = 10 | |
projection_type = "ALL" | |
} | |
tags = { | |
Name = var.environment_name | |
Environment = var.environment_type | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment