Coder Social home page Coder Social logo

Comments (8)

Mongey avatar Mongey commented on August 20, 2024

👋 Hey @joshbranham , what version of the provider are you using? Prior to v0.2.3 the ca_cert etc took a path, which, as you said it looks like it's attempting to do that.

If you're not using the latest version, I think you'll need something like this....

provider "kafka" {
  version           = "~> 0.2"
  bootstrap_servers = ["production-kafka.<redacted>:9093"]
  ca_cert           = "/home/ca.crt"
  client_cert       = "/home/client.crt"
  client_key        = "/home/private.key"
}

If you are using the 0.2.3 version, and this is happening, it's a bug

from terraform-provider-kafka.

joshbranham avatar joshbranham commented on August 20, 2024

@Mongey I am using 0.2.3

from terraform-provider-kafka.

joshbranham avatar joshbranham commented on August 20, 2024

also fwiw I am just using certificate files on disk (running in Atlantis) and I tried moving the files to shorter paths with no luck so I am pretty sure its doing something funky like trying to load the contents of the file as the path or something?

I also tried using 0.2.2 but then Terraform does not seem to find the provider called kafka anymore..

Initializing provider plugins...
- Checking for available provider plugins...

Provider "kafka" not available for installation.

A provider named "kafka" could not be found in the Terraform Registry.

This may result from mistyping the provider name, or the given provider may
be a third-party provider that cannot be installed automatically.

from terraform-provider-kafka.

MattPumphrey avatar MattPumphrey commented on August 20, 2024

We installed the Kafka provider into our atlantis docker container to be able to execute this. I hope that helps with that.

from terraform-provider-kafka.

joshbranham avatar joshbranham commented on August 20, 2024

We installed the Kafka provider into our atlantis docker container to be able to execute this. I hope that helps with that.

Yeah I have that part down, its more the SSL error. What version are you using? Did 0.2.2 work for you?

from terraform-provider-kafka.

Mongey avatar Mongey commented on August 20, 2024

also fwiw I am just using certificate files on disk (running in Atlantis) and I tried moving the files to shorter paths with no luck so I am pretty sure its doing something funky like trying to load the contents of the file as the path or something?

We do have some tests that are loading in certs with files, so I'm a bit surprised

provider "kafka" {
bootstrap_servers = ["localhost:9092"]
ca_cert = file("../secrets/snakeoil-ca-1.crt")
client_cert = file("../secrets/kafkacat-ca1-signed.pem")
client_key = file("../secrets/kafkacat-raw-private-key.pem")
}

@joshbranham can you use terraform console to make sure the files are being loaded correctly?

Also debug logs might help track down some issues. TF_LOG=debug terraform plan

from terraform-provider-kafka.

joshbranham avatar joshbranham commented on August 20, 2024

I found one issue with my private key being formatted wrong and fixed that..sorry for the confusion. Now looking at Error connecting to kafka kafka: client has run out of available brokers to talk to (Is your cluster reachable?) which could be a transport issue.

It was weird that the error above about opening the file was not my private key but the client cert. That library seems to be giving an odd error back?

from terraform-provider-kafka.

joshbranham avatar joshbranham commented on August 20, 2024

Closing this, the issue was we are using a ELB in TCP mode that points to all kafka brokers in order to easily discover the brokers. For instance production-kafka.dns.com points to ELB that then forwards to all the brokers on the same port. For some reason that is not working, I will dig some more into that but it is probably something in https://github.com/shopify/sarama

Thanks for your time @Mongey

from terraform-provider-kafka.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.