Terraform module that exposes an existing MSK cluster to the internet.
This module takes an existing MSK cluster built in a public subnet and assigns an EIP to each broker. It outputs an /etc/hosts file so that you can use the same MSK broker connection string, which is helpful if clients are doing SSL host verification.
module "public_msk" {
source = "cgetzen/public-msk/aws"
cluster_name = "production-app1"
propogate_tags = true
check_errors = true
create_host_file = true
tags = {
created_with = "terraform"
environment = "prod"
}
}
Name | Description | Type | Default | Required |
---|---|---|---|---|
cluster_name | The existing MSK cluster | string |
"" |
yes |
propogate_tags | Propogate MSKs tags to the EIPs | bool |
true |
no |
check_errors | Checks if MSK is configured properly | bool |
true |
no |
create_host_file | Creates /etc/hosts file necessary to connect to MSK | bool |
true |
no |
tags | Additional EIP tags | map(string) |
{} |
no |
- An existing MSK cluster. It is better to put this in a different state file, to avoid needing to target when building.
- MSK in public subnets.
check_errors
will confirm this for you by looking if the subnets use an IGW instead of a NAT. - MSK configured to use TLS certificates. You don't want to expose it otherwise!