You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/cloud/services/ec2/instances.go
+9-5Lines changed: 9 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,8 @@ func (s *Service) GetRunningInstanceByTags(scope *scope.MachineScope) (*infrav1.
75
75
returnnil, nil
76
76
}
77
77
78
-
// InstanceIfExists returns the existing instance or nothing if it doesn't exist.
78
+
// InstanceIfExists returns the existing instance by id and errors if it cannot find the instance(ErrInstanceNotFoundByID) or API call fails (ErrDescribeInstance).
79
+
// Returns empty instance with nil error, only when providerID is nil.
0 commit comments