I'm using the terraform azurerm provider, and it get's stuck during initialisation. After some debugging I found that it's waiting for the Microsoft.AVM provider to get registered.
az provider list --query "[?registrationState=='Registering']" -o table shows
Namespace RegistrationState RegistrationPolicy
------------- ------------------- --------------------
Microsoft.AVS Registering RegistrationRequired
I tried to az provider unregister --namespace Microsoft.AVS --wait but that also times out after a loooong time.
it seems other people have a similar problem: https://github.com/Azure/azure-cli/issues/28349 -
Need to check below:
Usually unregistering a provider like
Microsoft.AVSwith Azure CLI or PowerShell takes longer than expected as it will also delete the dependent resources also along with the given provider.As you have given, the bug has already been raised on this specific issue in Github.
Temporarily, check below points to resolve the issue.
1.
Refer
skip_provider_registrationargument available in terraform.To disable registration of default providers, add below code in terraform code.
As mentioned above, you need to have a proper permission to register/unregister certain providers like
AVS. Make sure that you have acontributorrole assigned under your tenant.If still the issue persists, contact Azure support team for assistance.