-
Notifications
You must be signed in to change notification settings - Fork 67
Expand file tree
/
Copy pathmain.tf
More file actions
35 lines (28 loc) · 765 Bytes
/
main.tf
File metadata and controls
35 lines (28 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
resource "aws_dynamodb_table" "demo_table" {
name = "MusicTable"
billing_mode = "PROVISIONED"
read_capacity = 20
write_capacity = 20
hash_key = "Artist"
range_key = "Song"
attribute {
name = "Artist"
type = "S"
}
attribute {
name = "Song"
type = "S"
}
stream_enabled = true
stream_view_type = "NEW_AND_OLD_IMAGES"
}
resource "aws_kinesis_stream" "demo_stream" {
name = "demo_stream"
shard_count = 1
retention_period = 24
shard_level_metrics = ["IncomingBytes", "OutgoingBytes"]
}
resource "aws_dynamodb_kinesis_streaming_destination" "streaming_destination" {
stream_arn = aws_kinesis_stream.demo_stream.arn
table_name = aws_dynamodb_table.demo_table.name
}