msk-apache-kafka-cluster
cloudposse/msk-apache-kafka-cluster/aws
Terraform module to provision AWS MSK
Terraform module to provision Amazon Managed Streaming for Apache Kafka __Note:__ this module is intended for use with an existing VPC. To create a new VPC, use terraform-aws-vpc module. NOTE: Release 0.8.0 contains breaking changes that will result in the destruction of your existing MSK cluster. To preserve the original cluster, follow the instructions in the 0.7.x to 0.8.x+ migration path. > [!TIP] > #### 👽 Use Atmos with Terraform > Cloud Posse uses atmos to easily orchestrate multiple environments using Terraform. > Works with Github Actions, Atlantis, or Spacelift. > > > Watch demo of using Atmos with Terraform > > Example of running atmos to manage infrastructure from our Quick Start tutorial. > Usage Here's how to invoke this example module in your projects ```hcl module "kafka" {
| Name | Type | Description | Default |
|---|---|---|---|
| vpc_id | string | The ID of the VPC where the Security Group will be created. | required |
| broker_instance_type | string | The instance type to use for the Kafka brokers | required |
| subnet_ids | list(string) | Subnet IDs for Client Broker | required |
| kafka_version | string | The desired Kafka software version. Refer to https://docs.aws.amazon.com/msk/lat | required |
| security_group_create_timeout | string | How long to wait for the security group to be created. | "10m" |
| allow_all_egress | bool | If `true`, the created security group will allow egress on all ports and protoco | true |
| client_sasl_scram_secret_association_enabled | bool | Enable the list of AWS Secrets Manager secret ARNs for SCRAM authentication | true |
| cloudwatch_logs_log_group | string | Name of the Cloudwatch Log Group to deliver logs to | null |
| enabled | bool | Set to false to prevent the module from creating any resources | null |
| tags | map(string) | Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`). Neither the tag keys nor the t | {} |
| descriptor_formats | any | Describe additional descriptors to be output in the `descriptors` output map. Ma | {} |
| firehose_logs_enabled | bool | Indicates whether you want to enable or disable streaming broker logs to Kinesis | false |
| namespace | string | ID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp' | null |
| label_value_case | string | Controls the letter case of ID elements (labels) as included in `id`, set as tag | null |
| security_group_name | list(string) | The name to assign to the created security group. Must be unique within the VPC. | [] |
| broker_per_zone | number | Number of Kafka brokers per zone | 1 |
| broker_dns_records_count | number | This variable specifies how many DNS records to create for the broker endpoints | 0 |
| jmx_exporter_enabled | bool | Set `true` to enable the JMX Exporter | false |
| allowed_cidr_blocks | list(string) | A list of IPv4 CIDRs to allow access to the security group created by this modul | [] |
| custom_broker_dns_name | string | Custom Route53 DNS hostname for MSK brokers. Use `%%ID%%` key to specify brokers | null |
| stage | string | ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'bu | null |
| attributes | list(string) | ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`, | [] |
| environment | string | ID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'st | null |
| create_security_group | bool | Set `true` to create and configure a new security group. If false, `associated_s | true |
| … and 10 more inputs | |||
security_group_id — The ID of the created security groupsecurity_group_arn — The ARN of the created security groupbootstrap_brokers_sasl_scram — Comma separated list of one or more DNS names (or IP addresses) and SASL SCRAM port pairs for accessbootstrap_brokers_vpc_connectivity_sasl_iam — Comma separated list of one or more DNS names (or IP addresses) and SASL IAM port pairs for access thostnames — List of MSK Cluster broker DNS hostnamescluster_arn — Amazon Resource Name (ARN) of the MSK clusterstorage_mode — Storage mode for supported storage tiersbootstrap_brokers_public_sasl_scram — Comma separated list of one or more DNS names (or IP addresses) and SASL SCRAM port pairs for publicbootstrap_brokers_vpc_connectivity_tls — Comma separated list of one or more DNS names (or IP addresses) and TLS port pairs for access to thezookeeper_connect_string — Comma separated list of one or more hostname:port pairs to connect to the Apache Zookeeper clusterconfig_arn — Amazon Resource Name (ARN) of the MSK configurationlatest_revision — Latest revision of the MSK configurationsecurity_group_name — The name of the created security groupcluster_name — MSK Cluster namebootstrap_brokers_tls — Comma separated list of one or more DNS names (or IP addresses) and TLS port pairs for access to thebootstrap_brokers_public_tls — Comma separated list of one or more DNS names (or IP addresses) and TLS port pairs for public accessbootstrap_brokers_sasl_iam — Comma separated list of one or more DNS names (or IP addresses) and SASL IAM port pairs for access tbootstrap_brokers_public_sasl_iam — Comma separated list of one or more DNS names (or IP addresses) and SASL IAM port pairs for public abroker_endpoints — List of broker endpointsbootstrap_brokers — Comma separated list of one or more hostname:port pairs of Kafka brokers suitable to bootstrap connebootstrap_brokers_vpc_connectivity_sasl_scram — Comma separated list of one or more DNS names (or IP addresses) and SASL SCRAM port pairs for accesszookeeper_connect_string_tls — Comma separated list of one or more hostname:port pairs to connect to the Apache Zookeeper cluster vcurrent_version — Current version of the MSK Cluster