resource "aws_dynamodb_table" "lock_table" {
  name           = var.lock_table_name
  billing_mode   = "PAY_PER_REQUEST"
  hash_key       = "LockID"

  depends_on = [ var.module_depends_on ]

  server_side_encryption {
    enabled = true
    kms_key_arn = aws_kms_key.tfstate.arn
  }

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

  tags = {
    Name = var.lock_table_name
  }

}
