Resource: aws_dynamodb_kinesis_streaming_destination

Enables a Kinesis streaming destination for data replication of a DynamoDB table.

Example Usage

resource "aws_dynamodb_table" "example" {
  name     = "orders"
  hash_key = "id"

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

resource "aws_kinesis_stream" "example" {
  name        = "order_item_changes"
  shard_count = 1
}

resource "aws_dynamodb_kinesis_streaming_destination" "example" {
  stream_arn = aws_kinesis_stream.example.arn
  table_name = aws_dynamodb_table.example.name
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import DynamoDB Kinesis Streaming Destinations using the table_name and stream_arn separated by ,. For example:

import {
  to = aws_dynamodb_kinesis_streaming_destination.example
  id = "example,arn:aws:kinesis:us-east-1:111122223333:exampleStreamName"
}

Using terraform import, import DynamoDB Kinesis Streaming Destinations using the table_name and stream_arn separated by ,. For example:

% terraform import aws_dynamodb_kinesis_streaming_destination.example example,arn:aws:kinesis:us-east-1:111122223333:exampleStreamName