File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
pkg/cloud/services/autoscaling Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -83,8 +83,9 @@ func (s *Service) SDKToAutoScalingGroup(v *autoscaling.Group) (*expinfrav1.AutoS
83
83
if len (v .Instances ) > 0 {
84
84
for _ , autoscalingInstance := range v .Instances {
85
85
tmp := & infrav1.Instance {
86
- ID : aws .StringValue (autoscalingInstance .InstanceId ),
87
- State : infrav1 .InstanceState (* autoscalingInstance .LifecycleState ),
86
+ ID : aws .StringValue (autoscalingInstance .InstanceId ),
87
+ State : infrav1 .InstanceState (* autoscalingInstance .LifecycleState ),
88
+ AvailabilityZone : * autoscalingInstance .AvailabilityZone ,
88
89
}
89
90
i .Instances = append (i .Instances , * tmp )
90
91
}
Original file line number Diff line number Diff line change @@ -218,8 +218,9 @@ func TestServiceSDKToAutoScalingGroup(t *testing.T) {
218
218
},
219
219
Instances : []* autoscaling.Instance {
220
220
{
221
- InstanceId : aws .String ("instanceId" ),
222
- LifecycleState : aws .String ("lifecycleState" ),
221
+ InstanceId : aws .String ("instanceId" ),
222
+ LifecycleState : aws .String ("lifecycleState" ),
223
+ AvailabilityZone : aws .String ("us-east-1a" ),
223
224
},
224
225
},
225
226
},
@@ -249,8 +250,9 @@ func TestServiceSDKToAutoScalingGroup(t *testing.T) {
249
250
},
250
251
Instances : []infrav1.Instance {
251
252
{
252
- ID : "instanceId" ,
253
- State : "lifecycleState" ,
253
+ ID : "instanceId" ,
254
+ State : "lifecycleState" ,
255
+ AvailabilityZone : "us-east-1a" ,
254
256
},
255
257
},
256
258
},
You can’t perform that action at this time.
0 commit comments