From c060264333f685086817db18822bacf15fcd616e Mon Sep 17 00:00:00 2001 From: Mandar Kulkarni Date: Mon, 9 Aug 2021 10:15:17 -0700 Subject: [PATCH] ec2_group: update documentation for specifying port ranges (#436) ec2_group: update documentation for specifying port ranges Depends-on: #429 SUMMARY Added missing part of documentation for specifying port ranges as -1 value in parameter from_port and to_port is only supported for proto:icmp. Fixes #397 ISSUE TYPE Docs Pull Request COMPONENT NAME ec2_group Reviewed-by: Jill R Reviewed-by: Markus Bergholz Reviewed-by: Alina Buzachis Reviewed-by: Mark Chappell Reviewed-by: None --- plugins/modules/ec2_group.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/plugins/modules/ec2_group.py b/plugins/modules/ec2_group.py index 8284a968e39..0d122a76b2e 100644 --- a/plugins/modules/ec2_group.py +++ b/plugins/modules/ec2_group.py @@ -95,10 +95,16 @@ - The IP protocol name (C(tcp), C(udp), C(icmp), C(icmpv6)) or number (U(https://en.wikipedia.org/wiki/List_of_IP_protocol_numbers)) from_port: type: int - description: The start of the range of ports that traffic is coming from. A value of C(-1) indicates all ports. + description: + - The start of the range of ports that traffic is coming from. + - A value can be between C(0) to C(65535). + - A value of C(-1) indicates all ports (only supported when I(proto=icmp)). to_port: type: int - description: The end of the range of ports that traffic is coming from. A value of C(-1) indicates all ports. + description: + - The end of the range of ports that traffic is coming from. + - A value can be between C(0) to C(65535). + - A value of C(-1) indicates all ports (only supported when I(proto=icmp)). rule_desc: type: str description: A description for the rule. @@ -156,10 +162,16 @@ - The IP protocol name (C(tcp), C(udp), C(icmp), C(icmpv6)) or number (U(https://en.wikipedia.org/wiki/List_of_IP_protocol_numbers)) from_port: type: int - description: The start of the range of ports that traffic is going to. A value of C(-1) indicates all ports. + description: + - The start of the range of ports that traffic is going to. + - A value can be between C(0) to C(65535). + - A value of C(-1) indicates all ports (only supported when I(proto=icmp)). to_port: type: int - description: The end of the range of ports that traffic is going to. A value of C(-1) indicates all ports. + description: + - The end of the range of ports that traffic is going to. + - A value can be between C(0) to C(65535). + - A value of C(-1) indicates all ports (only supported when I(proto=icmp)). rule_desc: type: str description: A description for the rule. @@ -269,7 +281,7 @@ # the containing group name may be specified here group_name: example - proto: all - # in the 'proto' attribute, if you specify -1, all, or a protocol number other than tcp, udp, icmp, or 58 (ICMPv6), + # in the 'proto' attribute, if you specify -1 (only supported when I(proto=icmp)), all, or a protocol number other than tcp, udp, icmp, or 58 (ICMPv6), # traffic on all ports is allowed, regardless of any ports you specify from_port: 10050 # this value is ignored to_port: 10050 # this value is ignored