Skip to content

Commit c125775

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

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
@@ -355,7 +355,7 @@ func (s *Service) findSubnet(scope *scope.MachineScope) (string, error) {
355355
var filtered []types.Subnet
356356
var errMessage string
357357
for _, subnet := range subnets {
358-
if *subnet.AvailabilityZone != failureDomain {
358+
if failureDomain != "" && *subnet.AvailabilityZone != failureDomain {
359359
// we could have included the failure domain in the query criteria, but then we end up with EC2 error
360360
// messages that don't give a good hint about what is really wrong
361361
errMessage += fmt.Sprintf(" subnet %q availability zone %q does not match failure domain %q.",

0 commit comments

Comments
 (0)