Skip to content

Commit e5a746f

Browse files
committed
Fix regression in machine deployments without failure domain set
Signed-off-by: Borja Clemente <[email protected]>
1 parent 33d0ce7 commit e5a746f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/cloud/services/ec2/instances.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ func (s *Service) findSubnet(scope *scope.MachineScope) (string, error) {
371371
var filtered []types.Subnet
372372
var errMessage string
373373
for _, subnet := range subnets {
374-
if *subnet.AvailabilityZone != failureDomain {
374+
if failureDomain != "" && *subnet.AvailabilityZone != failureDomain {
375375
// we could have included the failure domain in the query criteria, but then we end up with EC2 error
376376
// messages that don't give a good hint about what is really wrong
377377
errMessage += fmt.Sprintf(" subnet %q availability zone %q does not match failure domain %q.",

0 commit comments

Comments
 (0)