Skip to content

Commit

Permalink
Update count with a default
Browse files Browse the repository at this point in the history
  • Loading branch information
ismirlia committed Oct 15, 2024
1 parent f2ecf84 commit 179abfd
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions ibm/service/power/resource_ibm_pi_volume_bulk.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func ResourceIBMPIVolumeBulk() *schema.Resource {
ValidateFunc: validation.NoZeroValues,
},
Arg_Count: {
Default: 1,
Description: "Number of volumes to create. Default 1.",
ForceNew: true,
Optional: true,
Expand Down Expand Up @@ -276,12 +277,7 @@ func resourceIBMPIVolumeBulkCreate(ctx context.Context, d *schema.ResourceData,
Shareable: &shared,
Size: &size,
}
if v, ok := d.GetOk(Arg_Count); ok {
count := v.(int)
body.Count = int64(count)
} else {
body.Count = 1
}
body.Count = int64(d.Get(Arg_Count).(int))
if v, ok := d.GetOk(Arg_VolumeType); ok {
volType := v.(string)
body.DiskType = volType
Expand Down

0 comments on commit 179abfd

Please sign in to comment.