Skip to content

Commit

Permalink
Fix volume size and count validation
Browse files Browse the repository at this point in the history
  • Loading branch information
ismirlia committed Oct 15, 2024
1 parent 179abfd commit 73c7129
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ibm/service/power/resource_ibm_pi_volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func ResourceIBMPIVolume() *schema.Resource {
Description: "The size of the volume in GB.",
Required: true,
Type: schema.TypeFloat,
ValidateFunc: validation.NoZeroValues,
ValidateFunc: validation.FloatAtLeast(1),
},
Arg_VolumeType: {
Computed: true,
Expand Down
13 changes: 7 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,11 +85,12 @@ func ResourceIBMPIVolumeBulk() *schema.Resource {
ValidateFunc: validation.NoZeroValues,
},
Arg_Count: {
Default: 1,
Description: "Number of volumes to create. Default 1.",
ForceNew: true,
Optional: true,
Type: schema.TypeInt,
Default: 1,
Description: "Number of volumes to create. Default 1.",
ForceNew: true,
Optional: true,
Type: schema.TypeInt,
ValidateFunc: validation.IntAtLeast(1),
},
Arg_ReplicationEnabled: {
Computed: true,
Expand Down Expand Up @@ -138,7 +139,7 @@ func ResourceIBMPIVolumeBulk() *schema.Resource {
ForceNew: true,
Required: true,
Type: schema.TypeFloat,
ValidateFunc: validation.NoZeroValues,
ValidateFunc: validation.FloatAtLeast(1),
},
Arg_VolumeType: {
Computed: true,
Expand Down

0 comments on commit 73c7129

Please sign in to comment.