Skip to content

Commit

Permalink
feat: improve disk space custom diff error message
Browse files Browse the repository at this point in the history
  • Loading branch information
rriski committed Oct 7, 2024
1 parent 322d68d commit 36c3059
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/schemautil/custom_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func CustomizeDiffCheckDiskSpace(ctx context.Context, d *schema.ResourceDiff, m
}
if servicePlanParams.DiskSizeMBStep != 0 {
if (requestedDiskSpaceMB-servicePlanParams.DiskSizeMBDefault)%servicePlanParams.DiskSizeMBStep != 0 {
return fmt.Errorf("requested disk size has to increase from: '%s' in increments of '%s'", humanReadableDiskSpaceDefault, humanReadableDiskSpaceStep)
return fmt.Errorf("requested disk size has to increase from: '%s' in increments of '%s'. Got: '%s'", humanReadableDiskSpaceDefault, humanReadableDiskSpaceStep, humanReadableRequestedDiskSpace)
}
}
return nil
Expand Down Expand Up @@ -169,7 +169,6 @@ func CustomizeDiffDisallowMultipleManyToOneKeys(_ context.Context, d *schema.Res
return err
}
}

}

return nil
Expand Down

0 comments on commit 36c3059

Please sign in to comment.