Skip to content

Commit

Permalink
allow 0 (#2456)
Browse files Browse the repository at this point in the history
  • Loading branch information
lantoli authored Jul 23, 2024
1 parent 9831293 commit 12433b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/service/advancedcluster/resource_advanced_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,8 @@ func resourceCreate(ctx context.Context, d *schema.ResourceData, meta any) diag.

// Validate oplog_size_mb to show the error before the cluster is created.
if oplogSizeMB, ok := d.GetOkExists("advanced_configuration.0.oplog_size_mb"); ok {
if cast.ToInt64(oplogSizeMB) <= 0 {
return diag.FromErr(fmt.Errorf("`advanced_configuration.oplog_size_mb` cannot be <= 0"))
if cast.ToInt64(oplogSizeMB) < 0 {
return diag.FromErr(fmt.Errorf("`advanced_configuration.oplog_size_mb` cannot be < 0"))
}
}

Expand Down

0 comments on commit 12433b7

Please sign in to comment.