provider/triton: Fix error for VLAN ID validation

Source: https://apidocs.joyent.com/cloudapi/#CreateFabricVLAN

This suggests that the check is correct and the error message and
description are not, so this commit makes them match the docs.
This commit is contained in:
James Nugent 2016-03-29 16:17:47 -07:00
parent 2b34eb5a39
commit 155e7840ba
1 changed files with 2 additions and 2 deletions

View File

@ -18,14 +18,14 @@ func resourceVLAN() *schema.Resource {
Schema: map[string]*schema.Schema{
"vlan_id": {
Description: "number between 2-4095 indicating VLAN ID",
Description: "number between 0-4095 indicating VLAN ID",
Required: true,
ForceNew: true,
Type: schema.TypeInt,
ValidateFunc: func(val interface{}, field string) (warn []string, err []error) {
value := val.(int)
if value < 0 || value > 4095 {
err = append(err, errors.New("id must be between 2 and 4095"))
err = append(err, errors.New("vlan_id must be between 0 and 4095"))
}
return
},