diff --git a/routeros/provider_schema_helpers.go b/routeros/provider_schema_helpers.go index 1e22b817..1ae8adf8 100644 --- a/routeros/provider_schema_helpers.go +++ b/routeros/provider_schema_helpers.go @@ -28,6 +28,7 @@ const ( KeyDynamic = "dynamic" KeyDisabled = "disabled" KeyFilter = "filter" + KeyInactive = "inactive" KeyInterface = "interface" KeyInvalid = "invalid" KeyL2Mtu = "l2mtu" @@ -142,6 +143,10 @@ var ( Elem: schema.TypeString, Description: "Additional request filtering options.", } + PropInactiveRo = &schema.Schema{ + Type: schema.TypeBool, + Computed: true, + } PropInterfaceRw = &schema.Schema{ Type: schema.TypeString, Required: true, diff --git a/routeros/resource_interface_bridge_port.go b/routeros/resource_interface_bridge_port.go index f7337c65..03ee8bb9 100644 --- a/routeros/resource_interface_bridge_port.go +++ b/routeros/resource_interface_bridge_port.go @@ -193,10 +193,7 @@ func ResourceInterfaceBridgePort() *schema.Resource { Computed: true, Description: "Switch chip used by the port.", }, - "inactive": { - Type: schema.TypeBool, - Computed: true, - }, + KeyInactive: PropInactiveRo, "ingress_filtering": { Type: schema.TypeBool, Optional: true, diff --git a/routeros/resource_ip_route.go b/routeros/resource_ip_route.go index 84566c58..6fd81e83 100644 --- a/routeros/resource_ip_route.go +++ b/routeros/resource_ip_route.go @@ -71,10 +71,7 @@ func ResourceIPRoute() *schema.Resource { Computed: true, Description: "Shows actual (resolved) gateway and interface that will be used for packet forwarding.", }, - "inactive": { - Type: schema.TypeBool, - Computed: true, - }, + KeyInactive: PropInactiveRo, "pref_src": { Type: schema.TypeString, Optional: true, diff --git a/routeros/resource_ipv6_route.go b/routeros/resource_ipv6_route.go index 07a6a9e8..af256223 100644 --- a/routeros/resource_ipv6_route.go +++ b/routeros/resource_ipv6_route.go @@ -59,10 +59,7 @@ func ResourceIPv6Route() *schema.Resource { Computed: true, Description: "Shows actual (resolved) gateway and interface that will be used for packet forwarding.", }, - "inactive": { - Type: schema.TypeBool, - Computed: true, - }, + KeyInactive: PropInactiveRo, "pref_src": { Type: schema.TypeString, Optional: true,