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

[AWS::EC2::SecurityGroup] - [BUG] - No IPv6 egress by default #2241

Open
gautaz opened this issue Jan 18, 2025 · 0 comments
Open

[AWS::EC2::SecurityGroup] - [BUG] - No IPv6 egress by default #2241

gautaz opened this issue Jan 18, 2025 · 0 comments
Labels

Comments

@gautaz
Copy link

gautaz commented Jan 18, 2025

Name of the resource

AWS::EC2::SecurityGroup

Resource Name

No response

Issue Description

While the AWS::EC2::SecurityGroup documentation says:

If you do not specify an egress rule, we add egress rules that allow IPv4 and IPv6 traffic on all ports and protocols to any destination.
We do not add these rules if you specify your own egress rules.

Deploying a security group with no egress rule with CloudFormation results with only one IPv4 egress rule:

Image

Expected Behavior

I expect the default IPv6 egress rule to be present once CloudFormation has deployed a security group template with no egress.

Observed Behavior

See the screenshot in the issue description, no default IPv6 egress rule is deployed.

Test Cases

Here is a template extract of the failing security group:

  TestLoadBalancerSecurityGroup:
    Properties:
      GroupDescription: Internet to load balancer firewall rules
      SecurityGroupIngress:
        - CidrIpv6: ::/0
          FromPort: 80
          IpProtocol: TCP
          ToPort: 80
        - CidrIp: '0.0.0.0/0'
          FromPort: 80
          IpProtocol: TCP
          ToPort: 80
      VpcId: !Ref 'VPC'
    Type: AWS::EC2::SecurityGroup

Other Details

No response

@gautaz gautaz added the bug label Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant