terraform-routeros / terraform-provider-routeros

Terraform Provider for Mikrotik RouterOS
Mozilla Public License 2.0
190 stars 54 forks source link

fix(snmp-community): Allow a set of `addresses` #498

Closed johnelliott closed 3 months ago

johnelliott commented 3 months ago

Fixes #495

This uses the Any ability of the Terraform validation library to do either bare ipv4 or ipv6 addresses (which by observing the device essentially become /32 networks) and CIDR networks.

I wasn't sure what to update test-wise, could use help there.

johnelliott commented 3 months ago

Hi @vaerh this is my first PR. Thanks for the work on this provider, it's really cool!

Is this a direction we could go with this resource? I tested on my little device running v7.15.1.

vaerh commented 3 months ago

@johnelliott All of this is only moving because of people who care. Thanks for the fixes! P.S. There is no need to correct the documentation, it is generated automatically at each release.

vaerh commented 3 months ago

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

The release is available on GitHub release

Your semantic-release bot :package::rocket:

peterbaumert commented 3 months ago

Hi, this introduced an error when you dont specify addresses at all ( since its optional that should be ok ) But it says "Error: missing expected [".

vaerh commented 3 months ago

Thanks, I'll check it out. What version of ROS are you using? And can I see an example of your resource?

peterbaumert commented 3 months ago

Hi @vaerh actually it seems like an issue of converting existing states with the string to the [] part. I am running ROS 7.15.1

vaerh commented 3 months ago

I had that thought. I unfortunately forgot to do the state migration in this release. Fixes are already in the process of discussion: #501

johnelliott commented 2 months ago

Thanks @vaerh, I wasn't aware of state migrators until just now and I'll take that into account on my next PR.