terraform-provider-kafka
terraform-provider-kafka copied to clipboard
This is not the correct controller for this cluster.
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" {
I'm facing the same issue. Did you find any solution @sdahlbac?
Possibly it was due to the topic already existing, but not certain