terraform-provider-kafka icon indicating copy to clipboard operation
terraform-provider-kafka copied to clipboard

This is not the correct controller for this cluster.

Open sdahlbac opened this issue 2 years ago • 2 comments

I might be doing something stupid, but:

  required_providers {
    ...
    kafka = {
      source  = "Mongey/kafka"
      version = "0.4.3"
    }
}
provider "kafka" {
  bootstrap_servers = split(",", data.tfe_outputs.base.values.kafka-url)
  sasl_username     = data.onepassword_item_login.kafka_admin.username
  sasl_password     = data.onepassword_item_login.kafka_admin.password
  sasl_mechanism    = "plain"
  tls_enabled       = true
  ca_cert           = data.onepassword_item_document.ca-cert.content
  timeout           = 10
}

where kafka url is kafka-0.kafka-headless.core.svc.cluster.local:9094,kafka-1.kafka-headless.core.svc.cluster.local:9094,kafka-2.kafka-headless.core.svc.cluster.local:9094

resource "kafka_topic" "_schemas" {
  name               = "_schemas"
  partitions         = 1
  replication_factor = 3
  config = {
    "cleanup.policy" = "compact"
  }
}

results in

│ Error: kafka server: This is not the correct controller for this cluster.
│
│   with kafka_topic._schemas,
│   on kafka-topics.tf line 1, in resource "kafka_topic" "_schemas":
│    1: resource "kafka_topic" "_schemas" {

sdahlbac avatar May 03 '22 11:05 sdahlbac

I'm facing the same issue. Did you find any solution @sdahlbac?

xoanmi avatar Jun 02 '22 16:06 xoanmi

Possibly it was due to the topic already existing, but not certain

sdahlbac avatar Jun 02 '22 16:06 sdahlbac