mirror of https://github.com/k3s-io/k3s
AWS: If we have no subnets, bail out early
We know the ELB call will fail, so we error out early rather than hitting the API. Preserves rate limit quota, and also allows us to give a more self-evident message. Fix #21993pull/6/head
parent
5cf837452b
commit
02e79b9e52
|
@ -2149,6 +2149,11 @@ func (s *AWSCloud) EnsureLoadBalancer(name, region string, publicIP net.IP, port
|
|||
return nil, err
|
||||
}
|
||||
|
||||
// Bail out early if there are no subnets
|
||||
if len(subnetIDs) == 0 {
|
||||
return nil, fmt.Errorf("could not find any suitable subnets for creating the ELB")
|
||||
}
|
||||
|
||||
// Create a security group for the load balancer
|
||||
var securityGroupID string
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue