From 642bab9396c9c2e47dfbd53a7f3e2ef6d0cc53ba Mon Sep 17 00:00:00 2001 From: Karuppiah Natarajan Date: Tue, 5 Oct 2021 10:35:50 +0530 Subject: [PATCH] add todo regarding api call to check if public ip is managed or not Signed-off-by: Karuppiah Natarajan --- azure/services/publicips/publicips.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure/services/publicips/publicips.go b/azure/services/publicips/publicips.go index a1984fd1136..4feedd76765 100644 --- a/azure/services/publicips/publicips.go +++ b/azure/services/publicips/publicips.go @@ -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