Skip to content

Commit

Permalink
fix: stop using Int32MaxValue as upper bound for validation
Browse files Browse the repository at this point in the history
  • Loading branch information
jlpedrosa authored and vaerh committed Mar 18, 2024
1 parent 6fefdbb commit fcae1bd
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions routeros/resource_ipv6_neighbor_discovery.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package routeros

import (
"math"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
)
Expand Down Expand Up @@ -77,11 +75,10 @@ func ResourceIPv6NeighborDiscovery() *schema.Resource {
Description: "Name of the IPv6 pool in which received IPv6 prefix will be added",
},
"mtu": {
Type: schema.TypeInt,
Optional: true,
Description: "The flag indicates whether hosts should use stateful autoconfiguration (DHCPv6) to obtain addresses",
// TODO Remove the validator #368
ValidateFunc: validation.IntBetween(0, math.MaxInt32),
Type: schema.TypeInt,
Optional: true,
Description: "The flag indicates whether hosts should use stateful autoconfiguration (DHCPv6) to obtain addresses",
ValidateFunc: validation.IntBetween(0, 90000),
},
"other_configuration": {
Type: schema.TypeBool,
Expand Down

0 comments on commit fcae1bd

Please sign in to comment.