Skip to content

Commit

Permalink
Add ability to set PROVISIONED or ON_DEMAND stream modes (closes #7)
Browse files Browse the repository at this point in the history
  • Loading branch information
jordan-tr authored and jbeemster committed Dec 5, 2022
1 parent b582f98 commit 047b35a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ No modules.
| <a name="input_retention_period"></a> [retention\_period](#input\_retention\_period) | The number of hours that a shard should retain data for | `number` | `24` | no |
| <a name="input_shard_count"></a> [shard\_count](#input\_shard\_count) | The number of shards to create the stream with | `number` | `1` | no |
| <a name="input_shard_level_metrics"></a> [shard\_level\_metrics](#input\_shard\_level\_metrics) | A list of shard-level CloudWatch metrics which can be enabled for the stream | `list(string)` | `[]` | no |
| <a name="input_stream_mode_details"></a> [stream\_mode\_details](#input\_stream\_mode\_details) | Capacity mode of the stream, either ON\_DEMAND or PROVISIONED (note: ON\_DEMAND comes with a much higher base cost for lower throughput - https://aws.amazon.com/kinesis/data-streams/pricing/) | `string` | `"PROVISIONED"` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | The tags to append to this resource | `map(string)` | `{}` | no |

## Outputs
Expand Down
4 changes: 4 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@ resource "aws_kinesis_stream" "stream" {
shard_level_metrics = var.shard_level_metrics

tags = local.tags

stream_mode_details {
stream_mode = var.stream_mode_details
}
}
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,9 @@ variable "tags" {
default = {}
type = map(string)
}

variable "stream_mode_details" {
description = "Capacity mode of the stream, either ON_DEMAND or PROVISIONED (note: ON_DEMAND comes with a much higher base cost for lower throughput - https://aws.amazon.com/kinesis/data-streams/pricing/)"
default = "PROVISIONED"
type = string
}

0 comments on commit 047b35a

Please sign in to comment.