Skip to content

Commit aa131a8

Browse files
committed
Add load balancer type check
1 parent 290c878 commit aa131a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/networking/subnet_resolver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ func (r *defaultSubnetsResolver) validateSubnetsMinimalCount(subnets []*ec2sdk.S
373373
// computeSubnetsMinimalCount returns the minimal count requirement for subnets.
374374
func (r *defaultSubnetsResolver) computeSubnetsMinimalCount(subnetLocale subnetLocaleType, resolveOpts SubnetsResolveOptions) int {
375375
minimalCount := 1
376-
if resolveOpts.ALBSingleSubnet {
376+
if resolveOpts.ALBSingleSubnet && resolveOpts.LBType == elbv2model.LoadBalancerTypeApplication {
377377
return minimalCount
378378
}
379379
if resolveOpts.LBType == elbv2model.LoadBalancerTypeApplication && subnetLocale == subnetLocaleTypeAvailabilityZone {

0 commit comments

Comments
 (0)