Skip to content

Commit

Permalink
fix: Fix the AlwaysPresentNotUserProvided helper to ignore stored e…
Browse files Browse the repository at this point in the history
…mpty values as RouterOS started returning such in 7.15
  • Loading branch information
dokmic authored and vaerh committed Jul 4, 2024
1 parent 77186c0 commit c22e017
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
4 changes: 0 additions & 4 deletions routeros/provider_schema_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.#`.
Expand Down
1 change: 0 additions & 1 deletion routeros/resource_interface_macvlan.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.`,
Expand Down

0 comments on commit c22e017

Please sign in to comment.