diff --git a/pkg/aws/aws.go b/pkg/aws/aws.go index 881e4d44..9ff3cc43 100644 --- a/pkg/aws/aws.go +++ b/pkg/aws/aws.go @@ -163,7 +163,9 @@ func (ac *awsCloud) setSuffixes(vpcID string) error { return errors.New("Subnet IDs must be a valid non-empty slice of strings") } } else { - publicSubnets, err := ac.findPublicSubnets(vpcID, ac.filterByName("{infraID}*-public-{region}*")) + var err error + + publicSubnets, err = ac.findPublicSubnets(vpcID, ac.filterByName("{infraID}*-public-{region}*")) if err != nil { return errors.Wrapf(err, "unable to find the public subnet") }