diff --git a/cloud/scope/managedcontrolplane.go b/cloud/scope/managedcontrolplane.go index 89de8163b..6b66fb94d 100644 --- a/cloud/scope/managedcontrolplane.go +++ b/cloud/scope/managedcontrolplane.go @@ -19,8 +19,6 @@ package scope import ( "context" "fmt" - "strings" - "sigs.k8s.io/cluster-api-provider-gcp/util/location" "google.golang.org/api/option" @@ -203,12 +201,6 @@ func (s *ManagedControlPlaneScope) GetAllNodePools(ctx context.Context) ([]infra return s.AllManagedMachinePools, s.AllMachinePools, nil } -func parseLocation(location string) string { - parts := strings.Split(location, "-") - region := strings.Join(parts[:2], "-") - return region -} - // Region returns the region of the GKE cluster. func (s *ManagedControlPlaneScope) Region() string { loc, _ := location.Parse(s.GCPManagedControlPlane.Spec.Location)