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

Confluent Cloud. Error: kafka: client has run out of available brokers to talk to: EOF #321

Closed
Jokba opened this issue Mar 8, 2023 · 2 comments

Comments

@Jokba
Copy link

Jokba commented Mar 8, 2023

I'm trying to create topics on my Confluent Cloud kafka cluster using this provider. Terraform plan looks shows the right change however when I apply it, I get this error.
Error: kafka: client has run out of available brokers to talk to: EOF

This is my code

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

provider "kafka" {
  bootstrap_servers = ["cluster-id.ca-central-1.aws.confluent.cloud:9092"]
  skip_tls_verify   = true
  tls_enabled = false
  sasl_mechanism = "plain"
  sasl_username = "redacted" #kafka cluster api key with global access
  sasl_password = "redacted" #kafka cluster api secret
}

locals {
  kafka-topics = [
    {
    name = "topic.token"
    }
  ]
}

resource "kafka_topic" "topic_token" {

  for_each = {
    for topic in local.kafka-topics : "${topic.name}" => topic
  }

  name				= "${each.value.name}.env"
  replication_factor		= 3 #var.replication_factor
  partitions			= 6 #var.partitions
  config = {
	"retention.ms"		 = 190000 #var.retention_policy
  }
}

I'm trying to avoid usign the confluent cloud provider as our code is already with this provider.

Thank you.

@Mongey
Copy link
Owner

Mongey commented Mar 9, 2023

Should tls_enabled be true here?

@Jokba
Copy link
Author

Jokba commented Mar 9, 2023

I don't know why I didn't try that but that seems to have worked. Thank you!

I'll most likely discover issues but for now the plan is to use this provider for kafka topics and ACL only. Other resources, I'll use confluent cloud provider

@Jokba Jokba closed this as completed Mar 9, 2023
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

2 participants