Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kafka Broker Issue #414

Open
th3cod3r opened this issue Apr 29, 2024 · 2 comments
Open

Kafka Broker Issue #414

th3cod3r opened this issue Apr 29, 2024 · 2 comments

Comments

@th3cod3r
Copy link

th3cod3r commented Apr 29, 2024

Hey @Mongey,

I was getting error with my tf file that Error: kafka: client has run out of available brokers to talk to: EOF

Here is tf file

terraform {
required_providers {
kafka = {
source = "Mongey/kafka"
version = "0.7.1"
}
}
}

provider "kafka" {
bootstrap_servers = ["192.168.24.15:9094"]
}

resource "kafka_topic" "logs" {
name = "a"
replication_factor = 1
partitions = 1
}

resource "kafka_quota" "quota" {
entity_name = "a"
entity_type = "user"
}

resource "kafka_acl" "test" {
resource_name = "a"
resource_type = "Topic"
acl_principal = "User:jamesontest2"
acl_host = "192.168.24.15"
acl_operation = "All"
acl_permission_type = "Allow"
}

Requirement:

The kafka is a shared kafka and I just only want to connect in it with a specific tenant id as i have to separate the kafka database with the tenant id (When a another server will connect then i have some producer that will auto-insert into it with the particular tenant id which i defined).
And have to apply some acl for security as well.

@CSimpiFoN
Copy link

Same issue against an AWS MSK setup. Network access is set up, and getting the same error even with assuming a role that has full access to the AWS account. The error message is not very useful unfortunately

@erichulburd
Copy link

I had the same issue. This has more or less been addressed in the readme. In my case, I had to instantiate the provider as so:

data "aws_msk_cluster" "main" {
  cluster_name = "MyClusterName"
}

data "aws_arn" "msk_cluster" {
  arn = data.aws_msk_cluster.main.arn
}

provider "kafka" {
  bootstrap_servers = split(",", data.aws_msk_cluster.main.bootstrap_brokers_sasl_iam)
  tls_enabled       = true
  sasl_mechanism    = "aws-iam"
  sasl_aws_region   = data.aws_arn.msk_cluster.region
}

I then assumed the required AWS role before running terraform apply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants