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

Bug - Error when creating a topic #67

Open
mateuszjanczak opened this issue Sep 10, 2023 · 0 comments
Open

Bug - Error when creating a topic #67

mateuszjanczak opened this issue Sep 10, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@mateuszjanczak
Copy link

Creating a topic doesn't work in the "ducky" plan, because there a random prefix is added to the topic name. There is no way to configure the prefix from Terraform.

Terraform:

terraform {
  required_providers {
    cloudkarafka = {
      source  = "CloudKarafka/cloudkarafka"
      version = "0.1.1"
    }
  }
}

provider "cloudkarafka" {
  apikey = var.api_key
}

resource "cloudkarafka_instance" "instance" {
  name   = "some-instance-name"
  plan   = "ducky"
  region = "amazon-web-services::eu-west-1"
}

resource "cloudkarafka_topic" "jobs_topic" {
  instance_id        = cloudkarafka_instance.instance.id
  name               = "some-topic-name"
  replication_factor = 3
  partitions         = 10
  config             = {
    cleanup_policy      = "delete",
    delete_retention_ms = 1073741824,
    retention_bytes     = 1073741824,
    retention_ms        = 604800000,
    segment_bytes       = 1073741824
  }
}

Output:

module.kafka.cloudkarafka_instance.instance: Creating...
module.kafka.cloudkarafka_instance.instance: Still creating... [10s elapsed]
module.kafka.cloudkarafka_instance.instance: Creation complete after 11s [name=some-instance-name]
module.kafka.cloudkarafka_topic.jobs_topic: Creating...

│ Error: Error creating topic

│ with module.kafka.cloudkarafka_topic.jobs_topic,
│ on ....\modules\kafka\main.tf line 7, in resource "cloudkarafka_topic" "jobs_topic":
│ 7: resource "cloudkarafka_topic" "jobs_topic" {

│ topic some-topic-name not found

CloudKarafka console:

topics

The topic created despite the error. Any ideas? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants