From 3ec86e165367f254c01ec23a896b9fb62d46b337 Mon Sep 17 00:00:00 2001 From: Ivan Savciuc Date: Thu, 21 Dec 2023 17:04:22 +0200 Subject: [PATCH] fix(kafka_topic): migration from v3 (#1491) --- CHANGELOG.md | 1 + .../userconfig/stateupgrader/v0/kafka/kafka_topic.go | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d845e92af..b454a25f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ nav_order: 1 - Deprecating `aiven_organization_user` resource and update data source logic that will be used instead of the corresponding resource - Add support for the `aiven_organization_user_group_member` resource, allowing the association of groups with the users. Please note that this resource is in the beta stage, and to use it, you would need to set the environment variable PROVIDER_AIVEN_ENABLE_BETA to a non-zero value. - Retry kafka topic creation error `Cluster only has N broker(s), cannot set replication factor to M` +- Fix Kafka Topic migration issues from V3 to V4. ## [4.9.4] - 2023-12-13 diff --git a/internal/schemautil/userconfig/stateupgrader/v0/kafka/kafka_topic.go b/internal/schemautil/userconfig/stateupgrader/v0/kafka/kafka_topic.go index 2fa897bd3..382e33c80 100644 --- a/internal/schemautil/userconfig/stateupgrader/v0/kafka/kafka_topic.go +++ b/internal/schemautil/userconfig/stateupgrader/v0/kafka/kafka_topic.go @@ -252,9 +252,11 @@ func ResourceKafkaTopicStateUpgrade( } err := typeupgrader.Map(config, map[string]string{ - "message_downconversion_enable": "bool", - "min_cleanable_dirty_ratio": "float", - "preallocate": "bool"}) + "message_downconversion_enable": "bool", + "min_cleanable_dirty_ratio": "float", + "preallocate": "bool", + "unclean_leader_election_enable": "bool", + }) if err != nil { return rawState, err }