Description
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.