Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting NIC resource by ID causes NoRegisteredProviderFound error message. #836

Closed
MetalMichael opened this issue Oct 29, 2017 · 1 comment

Comments

@MetalMichael
Copy link

Switched existing code to use the updated API (v11.1.1-beta from 7.0.0-beta). Were some breaking changes, but as far as I can tell, the method to delete a NIC shouldn't have changed? (despite the channels).

Source code:

nic := *(*vmProps.NetworkProfile.NetworkInterfaces)[0].ID
resChan, errChan := resourcesClient.DeleteByID(nic, nil)
select {
  case err = <-errChan:
    log.Printf("Could not delete NIC %s: %s", nic, err)
    return err
  case _ = <-resChan:
    log.Printf("NIC Deleted: %s", nic)
}

Output:

2017/10/29 12:42:32 Could not delete NIC /subscriptions/xxxxxxxxxxxxxxxxx/resourceGroups/ResGroup1/providers/Microsoft.Network/networkInterfaces/NIC-Something-1: resources.GroupClient#DeleteByID: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="NoRegisteredProviderFound" Message="No registered resource provider found for location 'uksouth' and API version '2017-05-10' for type 'networkInterfaces'. 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'. 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'."

Somehow seems to be using an invalid API version? (2017-05-10 isn't in the list?).

@MetalMichael MetalMichael changed the title Deleting resource by ID causes NoRegisteredProviderFound error message. Deleting NIC resource by ID causes NoRegisteredProviderFound error message. Oct 29, 2017
@MetalMichael
Copy link
Author

MetalMichael commented Oct 29, 2017

Oh, just noticed #741. Might be duplicate

Edit: Confirmed duplicate. Workaround by editing the hardcoded api version in the prepare methods.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant