From 36c3059129f4973d5a06b5ab086b4a746ccda4ec Mon Sep 17 00:00:00 2001 From: Timo Riski Date: Thu, 19 Sep 2024 10:21:49 +0300 Subject: [PATCH] feat: improve disk space custom diff error message --- internal/schemautil/custom_diff.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/schemautil/custom_diff.go b/internal/schemautil/custom_diff.go index 9c4b8718c..24f637912 100644 --- a/internal/schemautil/custom_diff.go +++ b/internal/schemautil/custom_diff.go @@ -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 @@ -169,7 +169,6 @@ func CustomizeDiffDisallowMultipleManyToOneKeys(_ context.Context, d *schema.Res return err } } - } return nil