Describe the bug
CloudFormation-Validate::W3687 is reported when ec2.Port.allIcmpV6() is used in EC2 security group rules.
declare const securityGroup: ec2.SecurityGroup;
securityGroup.addIngressRule(ec2.Peer.anyIpv6(), ec2.Port.allIcmpV6());
WARNING FromPort: ['FromPort', 'ToPort'] are ignored when using 'IpProtocol' value 'icmpv6' (CloudFormation Validate)
... aws-cdk-lib.aws_ec2.CfnSecurityGroupIngress
Acknowledge with 'CloudFormation-Validate::W3687'
-1 should be allowed at FromPort and ToPort for ICMPv6.
https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-ec2-securitygroupingress.html#cfn-ec2-securitygroupingress-fromport
A value of -1 indicates all ICMP/ICMPv6 types.
Regression Issue
Last Known Working CDK Library Version
No response
Expected Behavior
No warnings are reported.
Current Behavior
See description above.
Reproduction Steps
See description above.
Possible Solution
No response
Additional Information/Context
We can safely acknowledge this warning.
AWS CDK Library version (aws-cdk-lib)
2.262.1
AWS CDK CLI version
2.1133.0 (build 712d792)
Node.js Version
v24.18.0
OS
Linux
Language
TypeScript
Language Version
No response
Other information
No response
Describe the bug
CloudFormation-Validate::W3687is reported whenec2.Port.allIcmpV6()is used in EC2 security group rules.-1should be allowed at FromPort and ToPort for ICMPv6.https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-ec2-securitygroupingress.html#cfn-ec2-securitygroupingress-fromport
Regression Issue
Last Known Working CDK Library Version
No response
Expected Behavior
No warnings are reported.
Current Behavior
See description above.
Reproduction Steps
See description above.
Possible Solution
No response
Additional Information/Context
We can safely acknowledge this warning.
AWS CDK Library version (aws-cdk-lib)
2.262.1
AWS CDK CLI version
2.1133.0 (build 712d792)
Node.js Version
v24.18.0
OS
Linux
Language
TypeScript
Language Version
No response
Other information
No response