diff --git a/CHANGELOG.md b/CHANGELOG.md index f75cf974d..122d12ab8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ nav_order: 1 ## [MAJOR.MINOR.PATCH] - YYYY-MM-DD +## [4.12.1] - 2024-01-05 + +- Temporarily disable `local_retention_*` fields in `aiven_kafka_topic` resource + ## [4.12.0] - 2024-01-03 - Fix insufficient brokers error when create kafka topic diff --git a/docs/resources/kafka_topic.md b/docs/resources/kafka_topic.md index 9bbc7e575..9bbd36e5c 100644 --- a/docs/resources/kafka_topic.md +++ b/docs/resources/kafka_topic.md @@ -68,8 +68,8 @@ Optional: - `flush_messages` (String) flush.messages value - `flush_ms` (String) flush.ms value - `index_interval_bytes` (String) index.interval.bytes value -- `local_retention_bytes` (String) local.retention.bytes value -- `local_retention_ms` (String) local.retention.ms value +- `local_retention_bytes` (String) local.retention.bytes value. This field is temporarily disabled. +- `local_retention_ms` (String) local.retention.ms value. This field is temporarily disabled. - `max_compaction_lag_ms` (String) max.compaction.lag.ms value - `max_message_bytes` (String) max.message.bytes value - `message_downconversion_enable` (Boolean) message.downconversion.enable value diff --git a/go.mod b/go.mod index 7619e6e38..1817827d1 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/aiven/terraform-provider-aiven go 1.21 require ( - github.com/aiven/aiven-go-client/v2 v2.7.0 + github.com/aiven/aiven-go-client/v2 v2.8.0 github.com/avast/retry-go v3.0.0+incompatible github.com/dave/jennifer v1.7.0 github.com/docker/go-units v0.5.0 diff --git a/go.sum b/go.sum index a8760f06d..da7ea587f 100644 --- a/go.sum +++ b/go.sum @@ -203,6 +203,8 @@ github.com/aiven/aiven-go-client/v2 v2.6.1-0.20240102144320-a7653ed76349 h1:8yrp github.com/aiven/aiven-go-client/v2 v2.6.1-0.20240102144320-a7653ed76349/go.mod h1:x0xhzxWEKAwKv0xY5FvECiI6tesWshcPHvjwl0B/1SU= github.com/aiven/aiven-go-client/v2 v2.7.0 h1:nvDfzxsELIt+df7zLqePbrI6ZtazmNvhy/8LyKOZ810= github.com/aiven/aiven-go-client/v2 v2.7.0/go.mod h1:x0xhzxWEKAwKv0xY5FvECiI6tesWshcPHvjwl0B/1SU= +github.com/aiven/aiven-go-client/v2 v2.8.0 h1:1JZVmpp2emjrIWrDiec9+7CqTRyH/qTnhzJxkYUgVlU= +github.com/aiven/aiven-go-client/v2 v2.8.0/go.mod h1:x0xhzxWEKAwKv0xY5FvECiI6tesWshcPHvjwl0B/1SU= github.com/aiven/go-api-schemas v1.51.0 h1:6e9oxSTIhKFixOJV3fbnrpKAULhVxls4U4smZjRE7cU= github.com/aiven/go-api-schemas v1.51.0/go.mod h1:/bPxBUHza/2Aeer6hIIdB++GxKiw9K1KCBtRa2rtZ5I= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= diff --git a/internal/sdkprovider/service/kafkatopic/kafka_topic.go b/internal/sdkprovider/service/kafkatopic/kafka_topic.go index b9d6cd53a..024399255 100644 --- a/internal/sdkprovider/service/kafkatopic/kafka_topic.go +++ b/internal/sdkprovider/service/kafkatopic/kafka_topic.go @@ -224,13 +224,13 @@ var aivenKafkaTopicSchema = map[string]*schema.Schema{ }, "local_retention_bytes": { Type: schema.TypeString, - Description: "local.retention.bytes value", + Description: "local.retention.bytes value. This field is temporarily disabled.", Optional: true, DiffSuppressFunc: schemautil.EmptyObjectDiffSuppressFunc, }, "local_retention_ms": { Type: schema.TypeString, - Description: "local.retention.ms value", + Description: "local.retention.ms value. This field is temporarily disabled.", Optional: true, DiffSuppressFunc: schemautil.EmptyObjectDiffSuppressFunc, }, @@ -356,8 +356,8 @@ func getKafkaTopicConfig(d *schema.ResourceData) aiven.KafkaTopicConfig { SegmentMs: schemautil.ParseOptionalStringToInt64(configRaw["segment_ms"]), UncleanLeaderElectionEnable: schemautil.OptionalBoolPointer(d, "config.0.unclean_leader_election_enable"), RemoteStorageEnable: schemautil.OptionalBoolPointer(d, "config.0.remote_storage_enable"), - LocalRetentionBytes: schemautil.ParseOptionalStringToInt64(configRaw["local_retention_bytes"]), - LocalRetentionMs: schemautil.ParseOptionalStringToInt64(configRaw["local_retention_ms"]), + //LocalRetentionBytes: schemautil.ParseOptionalStringToInt64(configRaw["local_retention_bytes"]), + //LocalRetentionMs: schemautil.ParseOptionalStringToInt64(configRaw["local_retention_ms"]), } } @@ -512,8 +512,8 @@ func flattenKafkaTopicConfig(t *aiven.KafkaTopic) []map[string]interface{} { "segment_ms": schemautil.ToOptionalString(t.Config.SegmentMs.Value), "unclean_leader_election_enable": t.Config.UncleanLeaderElectionEnable.Value, "remote_storage_enable": t.Config.RemoteStorageEnable.Value, - "local_retention_bytes": schemautil.ToOptionalString(t.Config.LocalRetentionBytes.Value), - "local_retention_ms": schemautil.ToOptionalString(t.Config.LocalRetentionMs.Value), + //"local_retention_bytes": schemautil.ToOptionalString(t.Config.LocalRetentionBytes.Value), + //"local_retention_ms": schemautil.ToOptionalString(t.Config.LocalRetentionMs.Value), }, } }