# terraform-kinesis

## Overview

This is a module to create an AWS kinesis stream.

### Variables

There are two variables that must be provided for the module to function properly:
```
    - variable "environment"
    - variable "service_name"
```

Consult the variable definition file for additional options, which can be optionally overridden:
```
    - variable "data_retention_period"
    - variable "shard_count"
```

By default, server side encryption is enabled using the default AWS Kinesis KMS key alias. This can be overridden to use a different KMS key.

The following outputs are provided by the module for consumption in other terraform code:
```
    - kinesis_stream_arn
    - kinesis_stream_id
    - kinesis_stream_name
    - kinesis_stream_shard_count
```

### Resources

#### The module manages the following: 

* Creating the kinesis stream
* Enables KMS server side encryption

### Sample main.tf
```
variable env {}

provider "aws" {
  region = "us-east-1"
}

module "kinesis_stream" {
  source = "git@github.com:theorchard/terraform-kinesis.git//"

  environment      = "${var.env}"
  service_name     = "service_name"
  shard_count      = 5
  retention_period = 12
}
```
