Fix firewall JSON parsing to match production#13
Conversation
|
Huh, I was not aware you could specify multiple ports per rule. I think I know a pretty elegant way of solving this. |
|
Sorry for hijacking your change, but while implementing support for many different combinations of port ranges ( I also stumbled upon a lot of small nits here and there, so I rolled it all into a single PR (#15) and am currently releasing 7.0.0, which also includes the port range fix, but might mess up #14 (I haven't had a chance to take a good look yet). Thanks for highlighting this issue! |
|
Yeah no worries. I ended up not using this library and just built a golang version with Claude Code and now there's a cli and terraform provider too: https://github.com/midwork-finds-jobs/terraform-provider-hrobot Your code was very elegant but using it with terraform prooved to be a bit difficult. |
|
Oh that's cool, I might have a use for that too! I too looked into developing Terraform Providers using Rust (and this library specifically) but the Terraform Plugin system is (as you probably also discovered) very heavily reliant on the Go SDK/Framework developed by Hashicorp, so I wasn't able to get anything working either. |
Hey,
I was building a CLI support to this library with Claude and I noticed that sometimes the firewall config returned ports separated by comma eg:
80,443. This is not great fix but at least it started to work.It would be great to get some feedback on how you would want the structure to be in that case. Should it return multiple port ranges eg 80-80 and 443-443 in this case?