An easier way of handling `to_port` might be: `reverse(split("-", each.value["port_range"]))[0]`, which will always return the second number in the range if it exists (because it's reversing the list order), or otherwise return the lone port number (since it's the only element in the list).
Thank you for all your great videos Ned, they have really helped me with developing my TF skills.
Excellent explanation and useful examples, than you a lot.
An easier way of handling `to_port` might be: `reverse(split("-", each.value["port_range"]))[0]`, which will always return the second number in the range if it exists (because it's reversing the list order), or otherwise return the lone port number (since it's the only element in the list).
Amazing! Thanks for the tip.