Skip to content

Commit c1b240e

Browse files
authored
fix(elasticloadbalancingv2): http2Enabled with true is ignored in ApplicationLoadBalancer (#31675)
### Issue # (if applicable) Closes #31609. ### Reason for this change The `http2Enabled` can only be set to CFn if it is specified with false. Therefore, if it is specified with true, the change is not reflected in CFn. ### Description of changes Passed `http2Enabled` if it is not undefined. ```ts if (props.http2Enabled !== undefined) { this.setAttribute('routing.http2.enabled', props.http2Enabled ? 'true' : 'false'); } ``` ### Description of how you validated changes Both unit and integ tests. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent fec4bb1 commit c1b240e

File tree

10 files changed

+320
-111
lines changed

10 files changed

+320
-111
lines changed

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2/test/integ.alb.attributes.js.snapshot/Elbv2TestDefaultTestDeployAssert82DC2DEA.assets.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2/test/integ.alb.attributes.js.snapshot/aws-cdk-elbv2-integ.assets.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2/test/integ.alb.attributes.js.snapshot/aws-cdk-elbv2-integ.template.json

+57
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,63 @@
597597
"Ref": "VPCB9E5F0B4"
598598
}
599599
}
600+
},
601+
"Http2EnabledTrue1D814EE8": {
602+
"Type": "AWS::ElasticLoadBalancingV2::LoadBalancer",
603+
"Properties": {
604+
"LoadBalancerAttributes": [
605+
{
606+
"Key": "deletion_protection.enabled",
607+
"Value": "false"
608+
},
609+
{
610+
"Key": "routing.http2.enabled",
611+
"Value": "true"
612+
}
613+
],
614+
"Scheme": "internet-facing",
615+
"SecurityGroups": [
616+
{
617+
"Fn::GetAtt": [
618+
"Http2EnabledTrueSecurityGroupD6B38082",
619+
"GroupId"
620+
]
621+
}
622+
],
623+
"Subnets": [
624+
{
625+
"Ref": "VPCPublicSubnet1SubnetB4246D30"
626+
},
627+
{
628+
"Ref": "VPCPublicSubnet2Subnet74179F39"
629+
}
630+
],
631+
"Type": "application"
632+
},
633+
"DependsOn": [
634+
"VPCPublicSubnet1DefaultRoute91CEF279",
635+
"VPCPublicSubnet1RouteTableAssociation0B0896DC",
636+
"VPCPublicSubnet2DefaultRouteB7481BBA",
637+
"VPCPublicSubnet2RouteTableAssociation5A808732"
638+
]
639+
},
640+
"Http2EnabledTrueSecurityGroupD6B38082": {
641+
"Type": "AWS::EC2::SecurityGroup",
642+
"Properties": {
643+
"GroupDescription": "Automatically created Security Group for ELB awscdkelbv2integHttp2EnabledTrue2D380E08",
644+
"SecurityGroupEgress": [
645+
{
646+
"CidrIp": "255.255.255.255/32",
647+
"Description": "Disallow all traffic",
648+
"FromPort": 252,
649+
"IpProtocol": "icmp",
650+
"ToPort": 86
651+
}
652+
],
653+
"VpcId": {
654+
"Ref": "VPCB9E5F0B4"
655+
}
656+
}
600657
}
601658
},
602659
"Parameters": {

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2/test/integ.alb.attributes.js.snapshot/cdk.out

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2/test/integ.alb.attributes.js.snapshot/integ.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2/test/integ.alb.attributes.js.snapshot/manifest.json

+16-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)