My instructions were
a hash key of type String with name par
a sort key of type Number with name seq
a sort key of type Number with name ts
a local secondary index with name ts-idx that is an index on the combination of par and ts
In Terraform I have written below but it is erroring
resource “aws_dynamodb_table” “test-qac-sessionsnapshot-test” {
name = “test-qac-sessionsnapshot-test”
billing_mode = “PROVISIONED”
read_capacity = 20
write_capacity = 20
hash_key = “par”
range_key = “seq”
attribute {
name = “par”
type = “S”
}
attribute {
name = “seq”
type = “N”
}
attribute {
name = “ts”
type = “N”
}
ttl {
attribute_name = “TimeToExist”
enabled = false
}
local_secondary_index {
name = “ts-idx”
hash_key = “par”
range_key = “ts”
write_capacity = 10
read_capacity = 10
projection_type = “INCLUDE”
non_key_attributes = [“par”]
}
tags = {
Name = “qac-test”
Environment = “qac”
}
}