From c22e017534a6024a35d530d8da689a69ce07f360 Mon Sep 17 00:00:00 2001 From: Michael Dokolin Date: Tue, 25 Jun 2024 07:56:18 +0200 Subject: [PATCH] fix: Fix the `AlwaysPresentNotUserProvided` helper to ignore stored empty values as RouterOS started returning such in 7.15 --- routeros/provider_schema_helpers.go | 4 ---- routeros/resource_interface_macvlan.go | 1 - 2 files changed, 5 deletions(-) diff --git a/routeros/provider_schema_helpers.go b/routeros/provider_schema_helpers.go index b5dea17f..48782c51 100644 --- a/routeros/provider_schema_helpers.go +++ b/routeros/provider_schema_helpers.go @@ -671,10 +671,6 @@ var ( // Prevents the need of hardcode values for default values, as those are harder to track over time/versions of // routeros AlwaysPresentNotUserProvided = func(k, old, new string, d *schema.ResourceData) bool { - if old == "" { - return false - } - value := d.GetRawConfig() // For lists and sets, the key will look like `something.12345` or `something.#`. diff --git a/routeros/resource_interface_macvlan.go b/routeros/resource_interface_macvlan.go index e3ebc7af..257b01a4 100644 --- a/routeros/resource_interface_macvlan.go +++ b/routeros/resource_interface_macvlan.go @@ -27,7 +27,6 @@ func ResourceInterfaceMacVlan() *schema.Resource { private - does not allow communication between MACVLAN instances on the same parent interface. bridge - allows communication between MACVLAN instances on the same parent interface.`, ValidateFunc: validation.StringInSlice([]string{"private", "bridge"}, true), - DiffSuppressFunc: AlwaysPresentNotUserProvided, }, KeyMacAddress: PropMacAddressRw( `Static MAC address of the interface. A randomly generated MAC address will be assigned when not specified.`,