From 616049e04bd351111c7515e801b3e9e229dc3da8 Mon Sep 17 00:00:00 2001 From: Vaerh Date: Mon, 30 Sep 2024 08:32:59 +0300 Subject: [PATCH] =?UTF-8?q?fix(wireless):=20Delete=20required=20parameters?= =?UTF-8?q?=20Interaction=20with=20physical=20interfaces=20has=20been=20si?= =?UTF-8?q?mplified.=20It=20is=20possible,=20for=20example,=20to=20enable/?= =?UTF-8?q?disable=20an=20interface=20without=20specifying=20unnecessary?= =?UTF-8?q?=20parameters.=20resource=20=E2=80=9Crouteros=5Finterface=5Fwir?= =?UTF-8?q?eless=E2=80=9D=20=E2=80=98wlan-2ghz=E2=80=99=20{=20=20=20name?= =?UTF-8?q?=20=3D=20=E2=80=9Cwlan1=E2=80=9D=20=20=20disabled=20=3D=20var.w?= =?UTF-8?q?lan=5F2ghz=5Fdisabled=20}?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routeros/resource_interface_wireless.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/routeros/resource_interface_wireless.go b/routeros/resource_interface_wireless.go index 23085000..e0697f52 100644 --- a/routeros/resource_interface_wireless.go +++ b/routeros/resource_interface_wireless.go @@ -198,6 +198,7 @@ func ResourceInterfaceWireless() *schema.Resource { Description: "Defines set of used data rates, channel frequencies and widths.", ValidateFunc: validation.StringInSlice([]string{"2ghz-b", "2ghz-b/g", "2ghz-b/g/n", "2ghz-onlyg", "2ghz-onlyn", "5ghz-a", "5ghz-a/n", "5ghz-onlyn", "5ghz-a/n/ac", "5ghz-onlyac", "5ghz-n/ac"}, false), + DiffSuppressFunc: AlwaysPresentNotUserProvided, }, "basic_rates_ag": { Type: schema.TypeSet, @@ -483,7 +484,7 @@ func ResourceInterfaceWireless() *schema.Resource { }, "mode": { Type: schema.TypeString, - Required: true, + Optional: true, Description: "Selection between different station and access point (AP) modes. **Station modes**: `station` - Basic " + "station mode. Find and connect to acceptable AP. `station-wds` - Same as station, but create WDS link with " + "AP, using proprietary extension. AP configuration has to allow WDS links with this device. Note that " + @@ -727,9 +728,10 @@ func ResourceInterfaceWireless() *schema.Resource { ValidateFunc: validation.StringInSlice([]string{"integer"}, false), }, "ssid": { - Type: schema.TypeString, - Required: true, - Description: "SSID (service set identifier) is a name that identifies wireless network.", + Type: schema.TypeString, + Optional: true, + Description: "SSID (service set identifier) is a name that identifies wireless network.", + DiffSuppressFunc: AlwaysPresentNotUserProvided, }, "skip_dfs_channels": { Type: schema.TypeString,