Skip to content
This repository has been archived by the owner on May 25, 2022. It is now read-only.

Commit

Permalink
Support Kafka Shrink operation. (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
linouk23 committed Oct 28, 2021
1 parent 483d57c commit 55026c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/provider/resource_kafka_cluster.go
Expand Up @@ -184,7 +184,10 @@ func kafkaUpdate(ctx context.Context, d *schema.ResourceData, meta interface{})
if isCkuUpdate {
oldCku, newCku := d.GetChange(paramDedicatedCku)
if newCku.(int) < oldCku.(int) {
return diag.FromErr(fmt.Errorf("decreasing the number of CKUs is currently not supported"))
// decreasing the number of CKUs aka Kafka Shrink operation
if newCku.(int)+1 != oldCku.(int) {
return diag.FromErr(fmt.Errorf("decreasing the number of CKUs by more than 1 is currently not supported"))
}
}
availability := extractAvailability(d)
err = ckuCheck(cku, availability)
Expand Down

0 comments on commit 55026c4

Please sign in to comment.