Skip to content

Instantly share code, notes, and snippets.

@nishadmehendale
Created January 23, 2022 09:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nishadmehendale/2522818b9cb0ee64ac406d8afaced953 to your computer and use it in GitHub Desktop.
Save nishadmehendale/2522818b9cb0ee64ac406d8afaced953 to your computer and use it in GitHub Desktop.
Sample Kafka Topic Creation script with for each implementation
resource "kafka_topic" "kafka_topic" {
for_each = toset(var.topic_name)
name = each.key
replication_factor = 1
partitions = 3
config = {
"segment.ms" = "20000"
"cleanup.policy" = "compact"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment