/terraform-yc-kafka

Terrafrom module to manage Kafka cluster

Primary LanguageHCL

Kafka

Requirements

Name Version
terraform >= 1.5.0
yandex >= 0.98

Providers

Name Version
yandex >= 0.98

Modules

No modules.

Resources

Name Type
yandex_dns_recordset.this resource
yandex_mdb_kafka_cluster.this resource
yandex_mdb_kafka_topic.this resource
yandex_mdb_kafka_user.this resource

Inputs

Name Description Type Default Required
cluster_assign_public_ip Determines whether each broker will be assigned a public IP address. The default is false bool null no
cluster_brokers_count Count of brokers per availability zone. The default is 1 number null no
cluster_deletion_protection Inhibits deletion of the cluster bool null no
cluster_description A description of the Kafka cluster string "Kafka cluster managed by terraform" no
cluster_environment Deployment environment of the Kafka cluster.
Can be either PRESTABLE or PRODUCTION. The default is PRODUCTION
string "PRODUCTION" no
cluster_folder_id The ID of the folder that the Kafka cluster belongs to string null no
cluster_kafka_cname Internal CNAME for Kafka hosts string null no
cluster_maintenance_window Maintenance policy of the Kafka cluster any null no
cluster_maintenance_windows Maintenance policy of the Kafka cluster
Example:
cluster_maintenance_windows = {
type = "WEEKLY"
day = "MON
hour = "17"
}
map(any) {} no
cluster_name Kafka cluster name and name prefix for cluster resources string n/a yes
cluster_schema_registry Enables managed schema registry on cluster. The default is false bool null no
cluster_security_group_ids List of security group IDs to be assigned to cluster list(string) null no
cluster_subnet_ids IDs of the subnets, to which the Kafka cluster belongs list(string) [] no
cluster_topics A map of kafka topics.
Example:
cluster_topics = {
topic1 = {
partitions = 4
replication_factor = 1
config = {
cleanup_policy = "CLEANUP_POLICY_COMPACT"
}
},
topic2 = {
partitions = 8
replication_factor = 2
}
}
any {} no
cluster_unmanaged_topics Allows to use Kafka AdminAPI to manage topics. The default is false bool null no
cluster_users A map of kafka users.
Example:
cluster_users = {
user1 = {
password = passwordone
permissions = [
{
topic_name = "topic1"
role = "ACCESS_ROLE_CONSUMER"
}
]
},
user2 = {
password = passwordtwo
permissions = [
{
topic_name = "topic2"
role = "ACCESS_ROLE_CONSUMER"
},
{
topic_name = "topic3"
role = "ACCESS_ROLE_PRODUCER"
}
]
}
}
any {} no
cluster_version Version of the Kafka cluster string n/a yes
cluster_vpc_id ID of the network, to which the Kafka cluster belongs string n/a yes
cluster_zones List of availability zones list(string) n/a yes
internal_dns_zone_id Internal DNS zone ID for Kafka hosts string null no
internal_dns_zone_name Internal DNS zone name for Kafka hosts string null no
kafka_config Configuration of the Kafka subcluster.
Example:
kafka_config = {
resources = {
resource_preset_id = "s2.micro"
}
}
map(any) n/a yes
labels A set of key/value label pairs to assign to the Kubernetes cluster resources map(any) null no
zookeeper_config Configuration of the ZooKeeper subcluster.
Example:
zookeeper_config = {
resources = {
resource_preset_id = "s2.micro"
}
}
map(any) {} no

Outputs

Name Description
cluster_id Kafka cluster ID
cluster_kafka_cname_hosts A list of Kafka CNAME hosts
cluster_kafka_hosts A set of Kafka hosts
cluster_name Kafka cluster name
cluster_subnet_ids A list of Kafka cluster subnet IDs
cluster_topics A set of cluster topics
cluster_zookeper_hosts A set of Zookeeper hosts