Skip to content

Commit

Permalink
fix: import disk space fields (#1820)
Browse files Browse the repository at this point in the history
  • Loading branch information
rriski committed Sep 17, 2024
1 parent a5a2781 commit 0913cb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/schemautil/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -651,12 +651,12 @@ func copyServicePropertiesFromAPIResponseToTerraform(
diskSpace = int(*s.DiskSpaceMb)
}

if _, ok := d.GetOk("disk_space"); ok && diskSpace != 0 {
if diskSpace != 0 {
if err := d.Set("disk_space", HumanReadableByteSize(diskSpace*units.MiB)); err != nil {
return err
}
}
if _, ok := d.GetOk("additional_disk_space"); ok && diskSpace != 0 {
if diskSpace != 0 {
if err := d.Set("additional_disk_space", HumanReadableByteSize((diskSpace-servicePlanParams.DiskSizeMBDefault)*units.MiB)); err != nil {
return err
}
Expand Down

0 comments on commit 0913cb2

Please sign in to comment.