-
Notifications
You must be signed in to change notification settings - Fork 963
Description
Bug Report
- Import path of package : .
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/v2" - Import path version : v2.1.0
- Complete list of azure packages in the project :
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.2
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights v1.2.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.11.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentstacks v1.0.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.6.0
github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus v1.8.1
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4 v4.1.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v7 v7.0.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/v2 v2.1.0
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.0
github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 // indirect
-
SDK version : v1.18.0
-
output of
go version:go version go1.23.6 darwin/arm64 -
What happened?
We manage a lot of resources like Vnet, subnets, networkSecurityGroups etc in the Azure account using Go SDKs. During deletion, we delete resources one by one from a specific resource group in a particular order, and we have observed one intermittent issue that,BeginDeleteByID(ctx context.Context, resourceID string, apiVersion string, options *ClientBeginDeleteByIDOptions)function throwsNo registered resource provider foundeven when we have passed the correct API version in the function arguments
Here is the full error
DELETE https://management.azure.com/subscriptions/ad86b2ec-fcc9-4137-a214-ab7898ce5836/resourceGroups/rg-ibmbyoc-a1bd82b1-orchestration/providers/Microsoft.Network/networkSecurityGroups/vnet-ibmbyoc-a1bd82b1-common_nsg\n--------------------------------------------------------------------------------\nRESPONSE 400: 400 Bad Request\nERROR CODE: NoRegisteredProviderFound\n--------------------------------------------------------------------------------\n{\n \"error\": {\n \"code\": \"NoRegisteredProviderFound\",\n \"message\": \"No registered resource provider found for location 'eastus' and API version '2025-01-01' for type 'networkSecurityGroups'. The supported api-versions are '2014-12-01-preview, 2015-05-01-preview, 2015-06-15, 2016-03-30, 2016-06-01, 2016-07-01, 2016-08-01, 2016-09-01, 2016-10-01, 2016-11-01, 2016-12-01, 2017-03-01, 2017-04-01, 2017-06-01, 2017-08-01, 2017-09-01, 2017-10-01, 2017-11-01, 2018-01-01, 2018-02-01, 2018-03-01, 2018-04-01, 2018-05-01, 2018-06-01, 2018-07-01, 2018-08-01, 2018-10-01, 2018-11-01, 2018-12-01, 2019-02-01, 2019-04-01, 2019-06-01, 2019-07-01, 2019-08-01, 2019-09-01, 2019-11-01, 2019-12-01, 2020-01-01, 2020-03-01, 2020-04-01, 2020-05-01, 2020-06-01, 2020-07-01, 2020-08-01, 2020-11-01, 2021-01-01, 2021-02-01, 2021-03-01, 2021-04-01, 2021-05-01, 2021-06-01, 2021-08-01, 2021-12-01, 2022-01-01, 2022-05-01, 2022-07-01, 2022-09-01, 2022-11-01, 2023-02-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01, 2024-03-01, 2024-05-01, 2024-07-01, 2024-10-01'. The supported locations are 'westus, eastus, northeurope, westeurope, eastasia, southeastasia, northcentralus, southcentralus, centralus, eastus2, japaneast, japanwest, brazilsouth, australiaeast, australiasoutheast, centralindia, southindia, westindia, canadacentral, canadaeast, westcentralus, westus2, ukwest, uksouth, koreacentral, koreasouth, francecentral, australiacentral, southafricanorth, uaenorth, switzerlandnorth, germanywestcentral, norwayeast, westus3, jioindiawest, swedencentral, qatarcentral, polandcentral, italynorth, israelcentral, mexicocentral, spaincentral, newzealandnorth, indonesiacentral, chilecentral, malaysiawest, austriaeast'.\"\n }\n}\n--------------------------------------------------------------------------------\n.",
We have passed the '2025-01-01' version there which we get from following azure sdk (A function from armresources package)
func (client *ProvidersClient) Get(ctx context.Context, resourceProviderNamespace string, options *ProvidersClientGetOptions) (ProvidersClientGetResponse, error)
I checked from the azure portal, the api version was supported for that specific Azure subscription
- What did you expect or want to happen?
The resource deletion should succeed with the provided ApiVersion and ResourceID Argument - How can we reproduce it?
It is an intermittent issue, it occurs randomly. During deletion of 30+ resources, sometimes it fails to delete one, sometimes two and most of the times, everything will be deleted successfully.
Thanks!