Skip to content

Commit 0d6b6fb

Browse files
author
topcoderkz
committed
Remove cluster recreation when migrating from zk to kraft via tf [noci]
Remove cluster recreation when migrating from zk to kraft via tf commit_hash:48bed0ab603812c2d416fd27ffeb2354db4ef435
1 parent 64d92fe commit 0d6b6fb

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kind: BUG FIXES
2+
body: 'kafka: fix cluster recreation during ZooKeeper to KRaft migration - cluster now updates in-place and change default Kafka version in tests from 3.5 to 3.6 and fix HA test configuration for Kafka 3.6 KRaft-combine mode - use 3 zones instead of 2'
3+
time: 2025-11-11T12:05:06.000000+03:00

.mapping.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
".changes/unreleased/BUG FIXES-20251030-163410.yaml":"opensource/terraform-provider-yandex-mirror/.changes/unreleased/BUG FIXES-20251030-163410.yaml",
7171
".changes/unreleased/BUG FIXES-20251031-104010.yaml":"opensource/terraform-provider-yandex-mirror/.changes/unreleased/BUG FIXES-20251031-104010.yaml",
7272
".changes/unreleased/BUG FIXES-20251106-154637.yaml":"opensource/terraform-provider-yandex-mirror/.changes/unreleased/BUG FIXES-20251106-154637.yaml",
73+
".changes/unreleased/BUG FIXES-20251111-120506.yaml":"opensource/terraform-provider-yandex-mirror/.changes/unreleased/BUG FIXES-20251111-120506.yaml",
7374
".changes/unreleased/ENHANCEMENTS-20251007-125124.yaml":"opensource/terraform-provider-yandex-mirror/.changes/unreleased/ENHANCEMENTS-20251007-125124.yaml",
7475
".changes/unreleased/ENHANCEMENTS-20251027-070011.yaml":"opensource/terraform-provider-yandex-mirror/.changes/unreleased/ENHANCEMENTS-20251027-070011.yaml",
7576
".changes/unreleased/FEATURES-20251007-021241.yaml":"opensource/terraform-provider-yandex-mirror/.changes/unreleased/FEATURES-20251007-021241.yaml",

yandex/resource_yandex_mdb_kafka_cluster.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,6 @@ func resourceYandexMDBKafkaZookeeperResources() *schema.Resource {
375375
Description: "Type of the storage of ZooKeeper hosts. For more information see [the official documentation](https://yandex.cloud/docs/managed-kafka/concepts/storage).",
376376
Optional: true,
377377
Computed: true,
378-
ForceNew: true,
379378
},
380379
},
381380
}
@@ -401,7 +400,6 @@ func resourceYandexMDBKafkaKRaftControllerResources() *schema.Resource {
401400
Description: "Type of the storage of KRaft-controller hosts. For more information see [the official documentation](https://yandex.cloud/docs/managed-kafka/concepts/storage).",
402401
Optional: true,
403402
Computed: true,
404-
ForceNew: true,
405403
},
406404
},
407405
}

yandex/resource_yandex_mdb_kafka_cluster_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"github.com/yandex-cloud/terraform-provider-yandex/yandex/mocks"
2727
)
2828

29-
const currentDefaultKafkaVersion = "3.5"
29+
const currentDefaultKafkaVersion = "3.6"
3030

3131
const kfResource = "yandex_mdb_kafka_cluster.foo"
3232

@@ -1384,7 +1384,7 @@ func TestAccMDBKafkaCluster_HA(t *testing.T) {
13841384
testAccCheckMDBKafkaConfigKafkaHasResources(&r, "s2.micro", "network-hdd", 17179869184),
13851385
testAccCheckMDBKafkaClusterHasTopics(kfResource, []string{"raw_events", "final"}),
13861386
testAccCheckMDBKafkaClusterHasUsers(kfResource, map[string][]string{"alice": {"raw_events"}, "bob": {"raw_events", "final"}}),
1387-
testAccCheckMDBKafkaConfigZones(&r, []string{"ru-central1-a", "ru-central1-b"}),
1387+
testAccCheckMDBKafkaConfigZones(&r, []string{"ru-central1-a", "ru-central1-b", "ru-central1-d"}),
13881388
testAccCheckMDBKafkaConfigBrokersCount(&r, 1),
13891389
testAccCheckMDBKafkaClusterCompressionType(&r, kafka.CompressionType_COMPRESSION_TYPE_ZSTD),
13901390
testAccCheckMDBKafkaClusterLogRetentionBytes(&r, 1073741824),
@@ -1407,7 +1407,7 @@ func TestAccMDBKafkaCluster_HA(t *testing.T) {
14071407
resource.TestCheckResourceAttr(kfResource, "config.0.kafka_ui.0.enabled", "true"),
14081408
testAccCheckMDBKafkaClusterContainsLabel(&r, "new_key", "new_value"),
14091409
testAccCheckMDBKafkaConfigZones(&r, []string{"ru-central1-a", "ru-central1-b", "ru-central1-d"}),
1410-
testAccCheckMDBKafkaConfigBrokersCount(&r, 2),
1410+
testAccCheckMDBKafkaConfigBrokersCount(&r, 1),
14111411
testAccCheckMDBKafkaClusterHasTopics(kfResource, []string{"raw_events", "new_topic"}),
14121412
testAccCheckMDBKafkaClusterHasUsers(kfResource, map[string][]string{"alice": {"raw_events"}, "charlie": {"raw_events", "new_topic"}}),
14131413
testAccCheckMDBKafkaClusterCompressionType(&r, kafka.CompressionType_COMPRESSION_TYPE_ZSTD),
@@ -1901,7 +1901,7 @@ resource "yandex_mdb_kafka_cluster" "foo" {
19011901
config {
19021902
version = "%s"
19031903
brokers_count = 1
1904-
zones = ["ru-central1-a", "ru-central1-b"]
1904+
zones = ["ru-central1-a", "ru-central1-b", "ru-central1-d"]
19051905
assign_public_ip = false
19061906
schema_registry = false
19071907
rest_api {
@@ -1985,7 +1985,7 @@ resource "yandex_mdb_kafka_cluster" "foo" {
19851985
19861986
config {
19871987
version = "%s"
1988-
brokers_count = 2
1988+
brokers_count = 1
19891989
zones = ["ru-central1-a", "ru-central1-b", "ru-central1-d"]
19901990
assign_public_ip = false
19911991
schema_registry = false

0 commit comments

Comments
 (0)