Skip to content

Commit

Permalink
Added Kafka configuration that enables topic auto-creation
Browse files Browse the repository at this point in the history
  • Loading branch information
cer committed Jul 11, 2019
1 parent 49a3ad0 commit 785e483
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions aws-fargate-terraform/kafka.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,26 @@ resource "aws_msk_cluster" "eventuate" {
}
}

configuration_info {
arn = "${aws_msk_configuration.msk.arn}"
revision = "${aws_msk_configuration.msk.latest_revision}"
}

tags = {
Name = "eventuate"
}
}

resource "aws_msk_configuration" "msk" {
kafka_versions = ["2.1.0"]
name = "example"

server_properties = <<PROPERTIES
auto.create.topics.enable = true
delete.topic.enable = true
PROPERTIES
}

resource "aws_kms_key" "kms" {
description = "example"
}
Expand Down
2 changes: 1 addition & 1 deletion aws-fargate-terraform/sg.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ resource "aws_security_group" "kafka" {
vpc_id = "${aws_vpc.vpc-eventuate.id}"

ingress {
from_port = 9094
from_port = 9092
to_port = 9094
protocol = "TCP"
cidr_blocks = ["0.0.0.0/0"]
Expand Down

0 comments on commit 785e483

Please sign in to comment.