terraform-routeros / terraform-provider-routeros

Terraform Provider for Mikrotik RouterOS
Mozilla Public License 2.0
165 stars 46 forks source link

feat: Add some new properties introduced in RouterOS 7.15 #502

Closed dokmic closed 2 days ago

dokmic commented 4 days ago

This PR is mostly about adding newly added properties in the 7.15 release:

On top of that, RouterOS 7.15 started always returning an empty value in routeros_wifi_configuration (/rest/interface/wifi/configuration):

"aaa.password-format": "",

Since checking empty old values in the AlwaysPresentNotUserProvided helper makes no sense in the first place, we can safely remove this condition. The removal didn't cause any regressions.

vaerh commented 3 days ago

Since checking empty old values in the AlwaysPresentNotUserProvided helper makes no sense in the first place, we can safely remove this condition. The removal didn't cause any regressions.

@dokmic does it make sense to remove this check? It allows us to make a fast decision at the first step when checking a large number of new values.

dokmic commented 3 days ago

does it make sense to remove this check? It allows us to make a fast decision at the first step when checking a large number of new values.

@vaerh I don't think keeping it in the first place is correct. The property should be skipped if it's not present in the user configuration, regardless of the stored value. From what I see in the git history, this check was only for such optimization, but it may cause some side effects if we use this helper more.

For RouterOS, it's common to return empty strings for unset properties. This means that empty strings will end up in the state and, hence, in the old value. The aaa.password-format property is just our first case.

vaerh commented 2 days ago

Yeah, I agree.

vaerh commented 2 days ago

:tada: This PR is included in version 1.56.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: