Terraform module to create dynamodb table with autoscaling enabled
provider "aws" {
region = "us-east-1"
}
module "test_table" {
source = "chgangaraju/dynamodb-autoscaling/aws"
version = "1.0.1"
key = "id"
table_name = "test"
}
provider "aws" {
region = "us-east-1"
}
variable "capacity" {
type = "map"
default = {
min_read = 100
max_read = 4000
min_write = 100
max_write = 4000
}
}
module "test_table" {
source = "chgangaraju/dynamodb-autoscaling/aws"
version = "1.0.1"
key = "id"
table_name = "test"
read_capacity = 100
write_capacity = 100
capacity = "${var.capacity}"
}