[aws-elasticloadbalancingv2] NLB does not respect crossZoneEnabled flag fully
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
__[Not a Contribution]__
NLB does not respect crossZoneEnabled flag fully when it's set to false or it's not set
### Reproduction Steps
1. Set `crossZoneEnabled` to `true` for a NLB
1. Run `cdk deploy`
1. Observe that cross-zone load balancing is enabled for this NLB
1. Set `crossZoneEnabled` to `false` for the same NLB
1. Run `cdk deploy`
1. Observe that cross-zone load balancing is __still enabled__ for this NLB
### Error Log
No error produced by CDK
### Environment
- **CLI Version :** 1.50.0 (build 84acc92)
- **Framework Version:**
- **Node.js Version:** v14.5.0
- **OS :** MacOS 10.15.5
- **Language (Version):** all
### Other
Add an `else` statement here to account for when `crossZoneEnabled = false`
https://github.com/aws/aws-cdk/blob/d6a126508e4bb03f6f9d874c2c6648c3e3661a41/packages/%40aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-load-balancer.ts#L91
---
This is :bug: Bug Report
Contributor guide
Research direction
Start in packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-load-balancer.ts around line 91, then reproduce the reported toggle with cdk deploy. Done means changing crossZoneEnabled from true to false, or leaving it unset, causes the NLB's cross-zone load balancing setting to be disabled without a CDK error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100