diff --git a/go.mod b/go.mod index ac62c8cda..4e4203e64 100644 --- a/go.mod +++ b/go.mod @@ -39,7 +39,7 @@ require ( k8s.io/pod-security-admission v0.31.1 k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 sigs.k8s.io/cloud-provider-azure v1.31.1-0.20240914065912-f4dd79d54775 - sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.1.21 + sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.2.0 sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader v0.1.8 sigs.k8s.io/yaml v1.4.0 ) diff --git a/go.sum b/go.sum index 078ca5414..f991e38bc 100644 --- a/go.sum +++ b/go.sum @@ -463,8 +463,8 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3 h1:2770sDpzrjjsA sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= sigs.k8s.io/cloud-provider-azure v1.31.1-0.20240914065912-f4dd79d54775 h1:0YqezUI2dBm+Y+XgoXA0+Atd2CDEGFq6PS/8vtgwbJI= sigs.k8s.io/cloud-provider-azure v1.31.1-0.20240914065912-f4dd79d54775/go.mod h1:ZMuwABqLK6ICPch/wMIeMdTs15yH1lkPlwenTVzaB2A= -sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.1.21 h1:HQk15tR9x2Vzeo+7kP66fN0zvI/0wjaD+/FHOfztng8= -sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.1.21/go.mod h1:WSsOhr3Kr9BqIb88mgoEvcreu7vZujsQ31x3HXM+X6Y= +sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.2.0 h1:GrEsN+k8mSRI3Ea/kWufCzO4quQjPWuTt2JeKaLuqoQ= +sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.2.0/go.mod h1:WSsOhr3Kr9BqIb88mgoEvcreu7vZujsQ31x3HXM+X6Y= sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader v0.1.8 h1:fwg1J+nRRXkcA0lIJ/a4fJPg7tNggRH1pPOukthuAGw= sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader v0.1.8/go.mod h1:kUW9qMqi412c5+nXdYA00oSudWC9nVUCM4v1k3HtgZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= diff --git a/vendor/modules.txt b/vendor/modules.txt index 13942edd9..ed33da487 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1642,7 +1642,7 @@ sigs.k8s.io/cloud-provider-azure/pkg/util/string sigs.k8s.io/cloud-provider-azure/pkg/util/taints sigs.k8s.io/cloud-provider-azure/pkg/util/vm sigs.k8s.io/cloud-provider-azure/pkg/version -# sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.1.21 +# sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.2.0 ## explicit; go 1.23.1 sigs.k8s.io/cloud-provider-azure/pkg/azclient sigs.k8s.io/cloud-provider-azure/pkg/azclient/accountclient @@ -1668,6 +1668,7 @@ sigs.k8s.io/cloud-provider-azure/pkg/azclient/policy/ratelimit sigs.k8s.io/cloud-provider-azure/pkg/azclient/policy/ratelimit/flowcontrol sigs.k8s.io/cloud-provider-azure/pkg/azclient/policy/retryrepectthrottled sigs.k8s.io/cloud-provider-azure/pkg/azclient/policy/useragent +sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatednszonegroupclient sigs.k8s.io/cloud-provider-azure/pkg/azclient/privateendpointclient sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatelinkserviceclient sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatezoneclient diff --git a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/Makefile b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/Makefile index 0fdd6f363..5b19682d4 100644 --- a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/Makefile +++ b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/Makefile @@ -92,6 +92,7 @@ generatecode: build ## Generate client $(TYPESCAFFOLD) --package github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6 --package-alias armnetwork --resource Interface --client-name InterfacesClient --verbs get,createorupdate,delete,list --expand --ratelimitkey interfaceRateLimit $(TYPESCAFFOLD) --package github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6 --package-alias armnetwork --resource LoadBalancer --client-name LoadBalancersClient --verbs get,createorupdate,delete,list --expand --ratelimitkey loadBalancerRateLimit $(TYPESCAFFOLD) --package github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6 --package-alias armnetwork --resource PrivateEndpoint --client-name PrivateEndpointsClient --verbs get,createorupdate --expand --ratelimitkey privateEndpointRateLimit + $(TYPESCAFFOLD) --package github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6 --package-alias armnetwork --resource PrivateEndpoint --subresource PrivateDNSZoneGroup --client-name PrivateDNSZoneGroupsClient --verbs get,createorupdate,delete $(TYPESCAFFOLD) --package github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6 --package-alias armnetwork --resource PublicIPAddress --client-name PublicIPAddressesClient --verbs get,createorupdate,delete,list --expand --ratelimitkey publicIPAddressRateLimit $(TYPESCAFFOLD) --package github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6 --package-alias armnetwork --resource PublicIPPrefix --client-name PublicIPPrefixesClient --verbs get,createorupdate,delete,list --expand $(TYPESCAFFOLD) --package github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6 --package-alias armnetwork --resource RouteTable --client-name RouteTablesClient --verbs get,createorupdate,delete,list --ratelimitkey routeTableRateLimit diff --git a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/factory.go b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/factory.go index d7c3ee471..d64891068 100644 --- a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/factory.go +++ b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/factory.go @@ -31,6 +31,7 @@ import ( "sigs.k8s.io/cloud-provider-azure/pkg/azclient/ipgroupclient" "sigs.k8s.io/cloud-provider-azure/pkg/azclient/loadbalancerclient" "sigs.k8s.io/cloud-provider-azure/pkg/azclient/managedclusterclient" + "sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatednszonegroupclient" "sigs.k8s.io/cloud-provider-azure/pkg/azclient/privateendpointclient" "sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatelinkserviceclient" "sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatezoneclient" @@ -74,6 +75,7 @@ type ClientFactory interface { GetIPGroupClient() ipgroupclient.Interface GetLoadBalancerClient() loadbalancerclient.Interface GetManagedClusterClient() managedclusterclient.Interface + GetPrivateDNSZoneGroupClient() privatednszonegroupclient.Interface GetPrivateEndpointClient() privateendpointclient.Interface GetPrivateLinkServiceClient() privatelinkserviceclient.Interface GetPrivateZoneClient() privatezoneclient.Interface diff --git a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/factory_gen.go b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/factory_gen.go index e4f6076cb..435fde801 100644 --- a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/factory_gen.go +++ b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/factory_gen.go @@ -39,6 +39,7 @@ import ( "sigs.k8s.io/cloud-provider-azure/pkg/azclient/loadbalancerclient" "sigs.k8s.io/cloud-provider-azure/pkg/azclient/managedclusterclient" "sigs.k8s.io/cloud-provider-azure/pkg/azclient/policy/ratelimit" + "sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatednszonegroupclient" "sigs.k8s.io/cloud-provider-azure/pkg/azclient/privateendpointclient" "sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatelinkserviceclient" "sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatezoneclient" @@ -81,6 +82,7 @@ type ClientFactoryImpl struct { ipgroupclientInterface ipgroupclient.Interface loadbalancerclientInterface loadbalancerclient.Interface managedclusterclientInterface managedclusterclient.Interface + privatednszonegroupclientInterface privatednszonegroupclient.Interface privateendpointclientInterface privateendpointclient.Interface privatelinkserviceclientInterface privatelinkserviceclient.Interface privatezoneclientInterface privatezoneclient.Interface @@ -199,6 +201,12 @@ func NewClientFactory(config *ClientFactoryConfig, armConfig *ARMClientConfig, c return nil, err } + //initialize privatednszonegroupclient + factory.privatednszonegroupclientInterface, err = factory.createPrivateDNSZoneGroupClient(config.SubscriptionID) + if err != nil { + return nil, err + } + //initialize privateendpointclient factory.privateendpointclientInterface, err = factory.createPrivateEndpointClient(config.SubscriptionID) if err != nil { @@ -752,6 +760,25 @@ func (factory *ClientFactoryImpl) GetManagedClusterClient() managedclusterclient return factory.managedclusterclientInterface } +func (factory *ClientFactoryImpl) createPrivateDNSZoneGroupClient(subscription string) (privatednszonegroupclient.Interface, error) { + //initialize privatednszonegroupclient + options, err := GetDefaultResourceClientOption(factory.armConfig, factory.facotryConfig) + if err != nil { + return nil, err + } + + for _, optionMutFn := range factory.clientOptionsMutFn { + if optionMutFn != nil { + optionMutFn(options) + } + } + return privatednszonegroupclient.New(subscription, factory.cred, options) +} + +func (factory *ClientFactoryImpl) GetPrivateDNSZoneGroupClient() privatednszonegroupclient.Interface { + return factory.privatednszonegroupclientInterface +} + func (factory *ClientFactoryImpl) createPrivateEndpointClient(subscription string) (privateendpointclient.Interface, error) { //initialize privateendpointclient options, err := GetDefaultResourceClientOption(factory.armConfig, factory.facotryConfig) diff --git a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/mock_azclient/interface.go b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/mock_azclient/interface.go index 2120e1ab8..f79f885c0 100644 --- a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/mock_azclient/interface.go +++ b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/mock_azclient/interface.go @@ -44,6 +44,7 @@ import ( ipgroupclient "sigs.k8s.io/cloud-provider-azure/pkg/azclient/ipgroupclient" loadbalancerclient "sigs.k8s.io/cloud-provider-azure/pkg/azclient/loadbalancerclient" managedclusterclient "sigs.k8s.io/cloud-provider-azure/pkg/azclient/managedclusterclient" + privatednszonegroupclient "sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatednszonegroupclient" privateendpointclient "sigs.k8s.io/cloud-provider-azure/pkg/azclient/privateendpointclient" privatelinkserviceclient "sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatelinkserviceclient" privatezoneclient "sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatezoneclient" @@ -363,6 +364,20 @@ func (mr *MockClientFactoryMockRecorder) GetManagedClusterClient() *gomock.Call return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetManagedClusterClient", reflect.TypeOf((*MockClientFactory)(nil).GetManagedClusterClient)) } +// GetPrivateDNSZoneGroupClient mocks base method. +func (m *MockClientFactory) GetPrivateDNSZoneGroupClient() privatednszonegroupclient.Interface { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetPrivateDNSZoneGroupClient") + ret0, _ := ret[0].(privatednszonegroupclient.Interface) + return ret0 +} + +// GetPrivateDNSZoneGroupClient indicates an expected call of GetPrivateDNSZoneGroupClient. +func (mr *MockClientFactoryMockRecorder) GetPrivateDNSZoneGroupClient() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPrivateDNSZoneGroupClient", reflect.TypeOf((*MockClientFactory)(nil).GetPrivateDNSZoneGroupClient)) +} + // GetPrivateEndpointClient mocks base method. func (m *MockClientFactory) GetPrivateEndpointClient() privateendpointclient.Interface { m.ctrl.T.Helper() diff --git a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatednszonegroupclient/interface.go b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatednszonegroupclient/interface.go new file mode 100644 index 000000000..dda5cbc0f --- /dev/null +++ b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatednszonegroupclient/interface.go @@ -0,0 +1,31 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +azure:enableclientgen:=true +package privatednszonegroupclient + +import ( + armnetwork "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6" + + "sigs.k8s.io/cloud-provider-azure/pkg/azclient/utils" +) + +// +azure:client:verbs=get;createorupdate;delete,resource=PrivateEndpoint,subResource=PrivateDNSZoneGroup,packageName=github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6,packageAlias=armnetwork,clientName=PrivateDNSZoneGroupsClient,expand=false +type Interface interface { + utils.SubResourceGetFunc[armnetwork.PrivateDNSZoneGroup] + utils.SubResourceCreateOrUpdateFunc[armnetwork.PrivateDNSZoneGroup] + utils.SubResourceDeleteFunc[armnetwork.PrivateDNSZoneGroup] +} diff --git a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatednszonegroupclient/zz_generated_client.go b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatednszonegroupclient/zz_generated_client.go new file mode 100644 index 000000000..964dd5b80 --- /dev/null +++ b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatednszonegroupclient/zz_generated_client.go @@ -0,0 +1,101 @@ +// /* +// Copyright The Kubernetes Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// */ + +// Code generated by client-gen. DO NOT EDIT. +package privatednszonegroupclient + +import ( + "context" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/tracing" + armnetwork "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6" + + "sigs.k8s.io/cloud-provider-azure/pkg/azclient/metrics" + "sigs.k8s.io/cloud-provider-azure/pkg/azclient/utils" +) + +type Client struct { + *armnetwork.PrivateDNSZoneGroupsClient + subscriptionID string + tracer tracing.Tracer +} + +func New(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (Interface, error) { + if options == nil { + options = utils.GetDefaultOption() + } + tr := options.TracingProvider.NewTracer(utils.ModuleName, utils.ModuleVersion) + + client, err := armnetwork.NewPrivateDNSZoneGroupsClient(subscriptionID, credential, options) + if err != nil { + return nil, err + } + return &Client{ + PrivateDNSZoneGroupsClient: client, + subscriptionID: subscriptionID, + tracer: tr, + }, nil +} + +const GetOperationName = "PrivateDNSZoneGroupsClient.Get" + +// Get gets the PrivateDNSZoneGroup +func (client *Client) Get(ctx context.Context, resourceGroupName string, parentResourceName string, resourceName string) (result *armnetwork.PrivateDNSZoneGroup, err error) { + + metricsCtx := metrics.BeginARMRequest(client.subscriptionID, resourceGroupName, "PrivateDNSZoneGroup", "get") + defer func() { metricsCtx.Observe(ctx, err) }() + ctx, endSpan := runtime.StartSpan(ctx, GetOperationName, client.tracer, nil) + defer endSpan(err) + resp, err := client.PrivateDNSZoneGroupsClient.Get(ctx, resourceGroupName, parentResourceName, resourceName, nil) + if err != nil { + return nil, err + } + //handle statuscode + return &resp.PrivateDNSZoneGroup, nil +} + +const CreateOrUpdateOperationName = "PrivateDNSZoneGroupsClient.Create" + +// CreateOrUpdate creates or updates a PrivateDNSZoneGroup. +func (client *Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parentResourceName string, resource armnetwork.PrivateDNSZoneGroup) (result *armnetwork.PrivateDNSZoneGroup, err error) { + metricsCtx := metrics.BeginARMRequest(client.subscriptionID, resourceGroupName, "PrivateDNSZoneGroup", "create_or_update") + defer func() { metricsCtx.Observe(ctx, err) }() + ctx, endSpan := runtime.StartSpan(ctx, CreateOrUpdateOperationName, client.tracer, nil) + defer endSpan(err) + resp, err := utils.NewPollerWrapper(client.PrivateDNSZoneGroupsClient.BeginCreateOrUpdate(ctx, resourceGroupName, resourceName, parentResourceName, resource, nil)).WaitforPollerResp(ctx) + if err != nil { + return nil, err + } + if resp != nil { + return &resp.PrivateDNSZoneGroup, nil + } + return nil, nil +} + +const DeleteOperationName = "PrivateDNSZoneGroupsClient.Delete" + +// Delete deletes a PrivateDNSZoneGroup by name. +func (client *Client) Delete(ctx context.Context, resourceGroupName string, parentResourceName string, resourceName string) (err error) { + metricsCtx := metrics.BeginARMRequest(client.subscriptionID, resourceGroupName, "PrivateDNSZoneGroup", "delete") + defer func() { metricsCtx.Observe(ctx, err) }() + ctx, endSpan := runtime.StartSpan(ctx, DeleteOperationName, client.tracer, nil) + defer endSpan(err) + _, err = utils.NewPollerWrapper(client.BeginDelete(ctx, resourceGroupName, parentResourceName, resourceName, nil)).WaitforPollerResp(ctx) + return err +} diff --git a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/virtualnetworklinkclient/interface.go b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/virtualnetworklinkclient/interface.go index 3f4af5908..fce7d4287 100644 --- a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/virtualnetworklinkclient/interface.go +++ b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/virtualnetworklinkclient/interface.go @@ -23,8 +23,9 @@ import ( "sigs.k8s.io/cloud-provider-azure/pkg/azclient/utils" ) -// +azure:client:verbs=get;createorupdate,resource=PrivateZone,subResource=VirtualNetworkLink,packageName=github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns,packageAlias=armprivatedns,clientName=VirtualNetworkLinksClient,expand=false,rateLimitKey=virtualNetworkRateLimit +// +azure:client:verbs=get;createorupdate;delete,resource=PrivateZone,subResource=VirtualNetworkLink,packageName=github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns,packageAlias=armprivatedns,clientName=VirtualNetworkLinksClient,expand=false,rateLimitKey=virtualNetworkRateLimit type Interface interface { utils.SubResourceGetFunc[armprivatedns.VirtualNetworkLink] utils.SubResourceCreateOrUpdateFunc[armprivatedns.VirtualNetworkLink] + utils.SubResourceDeleteFunc[armprivatedns.VirtualNetworkLink] } diff --git a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/virtualnetworklinkclient/zz_generated_client.go b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/virtualnetworklinkclient/zz_generated_client.go index ff6151c96..8e578f7b1 100644 --- a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/virtualnetworklinkclient/zz_generated_client.go +++ b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/virtualnetworklinkclient/zz_generated_client.go @@ -87,3 +87,15 @@ func (client *Client) CreateOrUpdate(ctx context.Context, resourceGroupName stri } return nil, nil } + +const DeleteOperationName = "VirtualNetworkLinksClient.Delete" + +// Delete deletes a VirtualNetworkLink by name. +func (client *Client) Delete(ctx context.Context, resourceGroupName string, parentResourceName string, resourceName string) (err error) { + metricsCtx := metrics.BeginARMRequest(client.subscriptionID, resourceGroupName, "VirtualNetworkLink", "delete") + defer func() { metricsCtx.Observe(ctx, err) }() + ctx, endSpan := runtime.StartSpan(ctx, DeleteOperationName, client.tracer, nil) + defer endSpan(err) + _, err = utils.NewPollerWrapper(client.BeginDelete(ctx, resourceGroupName, parentResourceName, resourceName, nil)).WaitforPollerResp(ctx) + return err +}