AZ CLI versions related error

cloudfanatic 161 Reputation points

I am trying to create Azure HealthCare API and i get this error each time i run the terraform code.

No registered resource provider found for location 'westus2' and API version '2020-11-01-preview' for type 'workspaces'. The supported api-versions are '2021-06-01-preview'. The supported locations are 'southcentralus, northeurope, westeurope, eastus, eastus2, australiaeast, uksouth, westus2, canadacentral'.

azure-cli: 2.32.0 - my version oc az cli.

My question is in which version shall I upgrade my CLI?

Azure Cloud Services
Azure Cloud Services
An Azure platform as a service offer that is used to deploy web and cloud applications.
632 questions
{count} votes

Accepted answer
  1. kobulloc-MSFT 23,336 Reputation points Microsoft Employee

    Hello, @cloudfanatic !

    Azure CLI version 2.32.0 was released on January 4th, 2022 so no update is needed there. The no registered provider found error (see below for more details) looks like it is referring to your Azure Healthcare API version. You'll need to change your deployment template to include a more up to date API version.

    There are a couple places where you could encounter this that depend on your workflow. I'll include some documentation examples that go into more detail below as well as a quick Bicep example. Using Bicep, if you were creating a workspace using a template you would use 2021-06-01-preview:

    //Create a workspace  
    resource exampleWorkspace 'Microsoft.HealthcareApis/workspaces@2021-06-01-preview' = {  
      name: workspaceName  
      location: resourceGroup().location  

    No registered provider found error
    This relates to the following error:

    Code: NoRegisteredProviderFound  
    Message: No registered resource provider found for location {location}  
    and API version {api-version} for type {resource-type}.  

    The error message should give you suggestions for the supported locations and API versions. You can change your template to use a suggested value. Most providers are registered automatically by the Microsoft Azure portal or the command-line interface, but not all. If you haven't used a particular resource provider before, you might need to register that provider.

    More resources:

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful