Skip to content

Commit

Permalink
fix(elasticloadbalancingv2): http2Enabled with true is ignored in A…
Browse files Browse the repository at this point in the history
…pplicationLoadBalancer (#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*
  • Loading branch information
go-to-k authored Oct 10, 2024
1 parent fec4bb1 commit c1b240e
Show file tree
Hide file tree
Showing 10 changed files with 320 additions and 111 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,63 @@
"Ref": "VPCB9E5F0B4"
}
}
},
"Http2EnabledTrue1D814EE8": {
"Type": "AWS::ElasticLoadBalancingV2::LoadBalancer",
"Properties": {
"LoadBalancerAttributes": [
{
"Key": "deletion_protection.enabled",
"Value": "false"
},
{
"Key": "routing.http2.enabled",
"Value": "true"
}
],
"Scheme": "internet-facing",
"SecurityGroups": [
{
"Fn::GetAtt": [
"Http2EnabledTrueSecurityGroupD6B38082",
"GroupId"
]
}
],
"Subnets": [
{
"Ref": "VPCPublicSubnet1SubnetB4246D30"
},
{
"Ref": "VPCPublicSubnet2Subnet74179F39"
}
],
"Type": "application"
},
"DependsOn": [
"VPCPublicSubnet1DefaultRoute91CEF279",
"VPCPublicSubnet1RouteTableAssociation0B0896DC",
"VPCPublicSubnet2DefaultRouteB7481BBA",
"VPCPublicSubnet2RouteTableAssociation5A808732"
]
},
"Http2EnabledTrueSecurityGroupD6B38082": {
"Type": "AWS::EC2::SecurityGroup",
"Properties": {
"GroupDescription": "Automatically created Security Group for ELB awscdkelbv2integHttp2EnabledTrue2D380E08",
"SecurityGroupEgress": [
{
"CidrIp": "255.255.255.255/32",
"Description": "Disallow all traffic",
"FromPort": 252,
"IpProtocol": "icmp",
"ToPort": 86
}
],
"VpcId": {
"Ref": "VPCB9E5F0B4"
}
}
}
},
"Parameters": {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c1b240e

Please sign in to comment.