Skip to content

Commit 155e784

Browse files
committed
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.
1 parent 2b34eb5 commit 155e784

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

builtin/providers/triton/resource_vlan.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ func resourceVLAN() *schema.Resource {
1818

1919
Schema: map[string]*schema.Schema{
2020
"vlan_id": {
21-
Description: "number between 2-4095 indicating VLAN ID",
21+
Description: "number between 0-4095 indicating VLAN ID",
2222
Required: true,
2323
ForceNew: true,
2424
Type: schema.TypeInt,
2525
ValidateFunc: func(val interface{}, field string) (warn []string, err []error) {
2626
value := val.(int)
2727
if value < 0 || value > 4095 {
28-
err = append(err, errors.New("id must be between 2 and 4095"))
28+
err = append(err, errors.New("vlan_id must be between 0 and 4095"))
2929
}
3030
return
3131
},

0 commit comments

Comments
 (0)