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

CLI-3482: Reset to topic setting's default value operation is not supported #601

Open
emilcn opened this issue Mar 17, 2025 · 1 comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request

Comments

@emilcn
Copy link

emilcn commented Mar 17, 2025

I tried to remove topic settings that I no longer need, where I want to just fall back to whatever are the defaults provided by Confluent.

E.g. in below code I would remove some of the settings in the config block

resource "confluent_kafka_topic" "test_topic" {
  kafka_cluster {
    id = confluent_kafka_cluster.basic-cluster.id
  }
  topic_name         = "orders"

  config = {
    "cleanup.policy"                      = "delete"
    "delete.retention.ms"                 = "86400000"
    "max.compaction.lag.ms"               = "9223372036854775807"
    "max.message.bytes"                   = "2097164"
    "message.timestamp.after.max.ms"      = "9223372036854775807"
    "message.timestamp.before.max.ms"     = "9223372036854775807"      
    "message.timestamp.difference.max.ms" = "9223372036854775807"
    "message.timestamp.type"              = "CreateTime"
    "min.compaction.lag.ms"               = "0"
    "min.insync.replicas"                 = "2"
    "retention.bytes"                     = "-1"
    "retention.ms"                        = "604800000"
    "segment.bytes"                       = "104857600"
    "segment.ms"                          = "604800000"
  }
}

I used provider version confluentinc/confluent v2.17.0

Upon removing those settings, I get this error:

Error: error updating Kafka Topic "lkc-xxx/test_topic": reset to topic setting's default value operation (in other words, removing topic settings from 'configs' block) is not supported at the moment. Instead, find its default value at https://registry.terraform.io/providers/confluentinc/confluent/latest/docs/resources/confluent_kafka_topic and set its current value to the default value.

This is rather annoying, because it means my configurations for those old topics will have to include a long list of default values, values that I prefer not maintaining explicitly when it is something I have no specific preference for.

And it makes my configurations much longer, and less intuitive which settings have a reason for being there. I have to maintain all these settings which there is no reason for, which developers won't know by just looking at it. I can add comments, but its still much more verbose and harder to get an overview of which settings matter.

It would be much preferable if it was possible to simply remove the setting and let it be "unset" and fall back to the defaults that are managed by Confluent Cloud, rather than me needing to maintain my own copy of those default values.

@linouk23 linouk23 added the enhancement New feature or request label Mar 18, 2025
@linouk23
Copy link
Contributor

Thanks for creating this issue, @emilcn! It appears to be a duplicate of this issue. It’s currently blocked by the backend. The internal ticket key for this backend issue is KBROKER-389.

@semaphore-agent-production semaphore-agent-production bot changed the title Reset to topic setting's default value operation is not supported CLI-3482: Reset to topic setting's default value operation is not supported Mar 18, 2025
@sajjadlateef sajjadlateef added the duplicate This issue or pull request already exists label Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants