An open API service indexing awesome lists of open source software.

https://github.com/geekcell/terraform-aws-msk-cluster

Terraform module to provision an AWS MSK Cluster.
https://github.com/geekcell/terraform-aws-msk-cluster

aws kafka msk msk-cluster terraform terraform-module

Last synced: 3 months ago
JSON representation

Terraform module to provision an AWS MSK Cluster.

Awesome Lists containing this project

README

        

[![Geek Cell GmbH](https://raw.githubusercontent.com/geekcell/.github/main/geekcell-github-banner.png)](https://www.geekcell.io/)

### Code Quality
[![License](https://img.shields.io/github/license/geekcell/terraform-aws-msk-cluster)](https://github.com/geekcell/terraform-aws-msk-cluster/blob/master/LICENSE)
[![GitHub release (latest tag)](https://img.shields.io/github/v/release/geekcell/terraform-aws-msk-cluster?logo=github&sort=semver)](https://github.com/geekcell/terraform-aws-msk-cluster/releases)
[![Release](https://github.com/geekcell/terraform-aws-msk-cluster/actions/workflows/release.yaml/badge.svg)](https://github.com/geekcell/terraform-aws-msk-cluster/actions/workflows/release.yaml)
[![Validate](https://github.com/geekcell/terraform-aws-msk-cluster/actions/workflows/validate.yaml/badge.svg)](https://github.com/geekcell/terraform-aws-msk-cluster/actions/workflows/validate.yaml)
[![Lint](https://github.com/geekcell/terraform-aws-msk-cluster/actions/workflows/linter.yaml/badge.svg)](https://github.com/geekcell/terraform-aws-msk-cluster/actions/workflows/linter.yaml)

# Terraform AWS MSK Cluster Module

Terraform module which creates a MSK Cluster. The focus on this module lies within it's simplicity by providing
default values that should make sense for most use cases.

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [client\_subnets](#input\_client\_subnets) | A list of subnets to connect to in client VPC. | `list(string)` | n/a | yes |
| [cluster\_name](#input\_cluster\_name) | Name of the MSK cluster. | `string` | n/a | yes |
| [enable\_appautoscaling](#input\_enable\_appautoscaling) | Enable or disable MSK App Autoscaling. | `bool` | `false` | no |
| [instance\_type](#input\_instance\_type) | Specify the instance type to use for the kafka brokers. | `string` | n/a | yes |
| [kafka\_version](#input\_kafka\_version) | Specify the desired Kafka software version. | `string` | n/a | yes |
| [number\_of\_broker\_nodes](#input\_number\_of\_broker\_nodes) | The desired total number of broker nodes in the kafka cluster. | `number` | `3` | no |
| [security\_groups](#input\_security\_groups) | A list of the security groups to associate with the elastic network interfaces to control who can communicate with the cluster. | `list(string)` | n/a | yes |
| [tags](#input\_tags) | Tags to add to the AWS Customer Managed Key. | `map(any)` | `{}` | no |
| [volume\_size](#input\_volume\_size) | The size in GiB of the EBS volume for the data drive on each broker node. | `number` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| [bootstrap\_brokers\_tls](#output\_bootstrap\_brokers\_tls) | One or more DNS names (or IP addresses) and TLS port pairs. |
| [zookeeper\_connect\_string](#output\_zookeeper\_connect\_string) | A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster. |

## Providers

| Name | Version |
|------|---------|
| [aws](#provider\_aws) | >= 4.4 |

## Resources

- resource.aws_msk_cluster.main (main.tf#7)

# Examples
### Basic Example
```hcl
module "basic-example" {
source = "../../"
client_subnets = ["subnet-12345678", "subnet-87654321"]
cluster_name = "cluster1"
instance_type = "kafka.t3.small"
kafka_version = "3.2.0"
security_groups = ["sg-12345678"]
volume_size = 10
}
```
### With Autoscaling
```hcl
module "with-autoscaling" {
source = "../../"
client_subnets = ["subnet-12345678", "subnet-87654321"]
cluster_name = "cluster1"
instance_type = "kafka.t3.small"
kafka_version = "3.2.0"
security_groups = ["sg-12345678"]
volume_size = 10

enable_appautoscaling = true
}
```