Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model Not Parsing To/From Port when IpProtocol is specified as -1 #25

Closed
bjsemrad opened this issue Feb 27, 2018 · 3 comments
Closed

Model Not Parsing To/From Port when IpProtocol is specified as -1 #25

bjsemrad opened this issue Feb 27, 2018 · 3 comments

Comments

@bjsemrad
Copy link
Contributor

Per the AWS documentation
"IpProtocol
The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers). (VPC only) Use -1 to specify all protocols. If you specify -1, or a protocol number other than tcp, udp, icmp, or 58 (ICMPv6), traffic on all ports is allowed, regardless of any ports you specify. For tcp, udp, and icmp, you must specify a port range. For protocol 58 (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed."

When specifying the IpProtocol as -1 in a template, the parse will throw an exception stating to/from is required when it actually is not.

@ghost
Copy link

ghost commented Mar 10, 2018

Hi. Sorry for the delay. Do you have an example template demonstrating this? There isn't much "pre-validation" of AWS::EC2::SecurityGroup going on in cfn-model and I believe From/To are required for the free-standing AWS::EC2::SecurityGroupEgress and AWS::EC2::SecurityGroupIngress

@bjsemrad
Copy link
Contributor Author

bjsemrad commented Mar 10, 2018 via email

@bjsemrad
Copy link
Contributor Author

Sorry for the delay @erickascic, submitted #27 for this issue. If you need another example before accepting the request let me know. I would like to get this change built into the cfn-nag after, I can submit the updates there as needed.

@ghost ghost closed this as completed Mar 20, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant