Provides a DynamoDB table item resource
resource "aws_dynamodb_table_item" "example" {
table_name = aws_dynamodb_table.example.name
hash_key = aws_dynamodb_table.example.hash_key
item = <<ITEM
{
"exampleHashKey": {"S": "something"},
"one": {"N": "11111"},
"two": {"N": "22222"},
"three": {"N": "33333"},
"four": {"N": "44444"}
}
ITEM
}
resource "aws_dynamodb_table" "example" {
name = "example-name"
read_capacity = 10
write_capacity = 10
hash_key = "exampleHashKey"
attribute {
name = "exampleHashKey"
type = "S"
}
}
This argument supports the following arguments:
hash_key
- (Required) Hash key to use for lookups and identification of the itemitem
- (Required) JSON representation of a map of attribute name/value pairs, one for each attribute. Only the primary key attributes are required; you can optionally provide other attribute name-value pairs for the item.range_key
- (Optional) Range key to use for lookups and identification of the item. Required if there is range key defined in the table.table_name
- (Required) Name of the table to contain the item.This resource exports the following attributes in addition to the arguments above:
You cannot import DynamoDB table items.