Skip to content

Commit

Permalink
fix(switch): Correct schema errors
Browse files Browse the repository at this point in the history
Fixes #325
  • Loading branch information
vaerh committed Jan 19, 2024
1 parent 170e40a commit 509cd62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions routeros/resource_interface_ethernet_switch_host.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package routeros

import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
)

/*
Expand Down Expand Up @@ -75,10 +74,9 @@ func ResourceInterfaceEthernetSwitchHost() *schema.Resource {
Description: "Name of the switch to which the MAC address is going to be assigned to.",
},
"vlan_id": {
Type: schema.TypeInt,
Type: schema.TypeString,
Optional: true,
Description: "VLAN ID for the statically added MAC address entry.",
ValidateFunc: validation.IntBetween(0, 4094),
DiffSuppressFunc: AlwaysPresentNotUserProvided,
},
}
Expand Down
3 changes: 2 additions & 1 deletion routeros/resource_interface_ethernet_switch_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ func ResourceInterfaceEthernetSwitchRule() *schema.Resource {

KeyComment: PropCommentRw,
KeyDisabled: PropDisabledRw,
KeyDynamic: PropDynamicRo,
KeyInvalid: PropInvalidRo,

"copy_to_cpu": {
Expand Down Expand Up @@ -96,7 +97,7 @@ func ResourceInterfaceEthernetSwitchRule() *schema.Resource {
DiffSuppressFunc: AlwaysPresentNotUserProvided,
},
"ports": {
Type: schema.TypeString,
Type: schema.TypeList,
Required: true,
Description: "Name of the interface on which the rule will apply on the received traffic, multiple ports are allowed.",
Elem: &schema.Schema{
Expand Down

0 comments on commit 509cd62

Please sign in to comment.