We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98cc901 commit af08074Copy full SHA for af08074
pkg/cloud/services/autoscaling/autoscalinggroup.go
@@ -144,10 +144,12 @@ func (s *Service) CreateASG(scope *scope.MachinePoolScope) (*expinfrav1.AutoScal
144
for i, v := range scope.AWSMachinePool.Spec.Subnets {
145
subnetIDs[i] = aws.StringValue(v.ID)
146
}
147
- // subnetIDs := []string{}
148
- // for _, v := range scope.AWSMachinePool.Spec.Subnets {
149
- // subnetIDs = append(subnetIDs, aws.StringValue(v.ID))
150
- // }
+
+ if len(subnetIDs) == 0 {
+ for _, subnet := range scope.InfraCluster.Subnets() {
+ subnetIDs = append(subnetIDs, subnet.ID)
151
+ }
152
153
154
input := &expinfrav1.AutoScalingGroup{
155
Name: scope.Name(),
0 commit comments