Document about dynamodb table schema
I'm trying to bootstrap dynamodb tables using terraform because of iam policy restriction in my environment.
As there's dynamodb schema in java code, but I don't know how to translate that in terraform dynamodb attribute types.
Could you document dynamodb table schema?
Good point, i will document and maybe just extend the examples with one using Terraform to manage DynamoDb
Hey @PacoVK
Any updates on this? We ran into the same issue. Thanks!
I came up with this, most minimal one I could think of, hope it helps (and is correct):
resource "aws_dynamodb_table" "modules" {
name = "Modules"
billing_mode = "PAY_PER_REQUEST"
hash_key = "id"
region = data.aws_region.current.name
attribute {
name = "id"
type = "S"
}
}
resource "aws_dynamodb_table" "providers" {
name = "Providers"
billing_mode = "PAY_PER_REQUEST"
hash_key = "id"
region = data.aws_region.current.name
attribute {
name = "id"
type = "S"
}
}
resource "aws_dynamodb_table" "reports" {
name = "Reports"
billing_mode = "PAY_PER_REQUEST"
hash_key = "id"
region = data.aws_region.current.name
attribute {
name = "id"
type = "S"
}
}
resource "aws_dynamodb_table" "deploykeys" {
name = "DeployKeys"
billing_mode = "PAY_PER_REQUEST"
hash_key = "id"
region = data.aws_region.current.name
attribute {
name = "id"
type = "S"
}
}
Added this in PR #503
Thanks to @alchemyx PR #503 this is solved