Created
January 23, 2022 09:53
-
-
Save nishadmehendale/2522818b9cb0ee64ac406d8afaced953 to your computer and use it in GitHub Desktop.
Sample Kafka Topic Creation script with for each implementation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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