Skip to content

Commit

Permalink
add todo regarding api call to check if public ip is managed or not
Browse files Browse the repository at this point in the history
Signed-off-by: Karuppiah Natarajan <[email protected]>
  • Loading branch information
karuppiah7890 committed Oct 5, 2021
1 parent 936bbf2 commit 642bab9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions azure/services/publicips/publicips.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ func (s *Service) Delete(ctx context.Context) error {
// isIPManaged returns true if the IP has an owned tag with the cluster name as value,
// meaning that the IP's lifecycle is managed.
func (s *Service) isIPManaged(ctx context.Context, ipName string) (bool, error) {
// TODO(karuppiah7890): Replace GET public IP API with GET Tags At Scope API call with Public IP
// as scope to just get the tags as we want only tag data to check if IP is managed or not.
// A GET public IP API is heavier with more data and hence unnecessary.
ip, err := s.Client.Get(ctx, s.Scope.ResourceGroup(), ipName)
if err != nil {
return false, err
Expand Down

0 comments on commit 642bab9

Please sign in to comment.