If you can't wait until the deployment to resolve this issue is completed the following are available mitigations:
- If at all possible, update your provisioning workflows to not rely on Registration completion. All CRUD operations for Azure Media Services will work even with the resource provider stuck in the "registering" state.
- If you will not be using Azure Media Services (e.g., true for some Terraform provisioning workflows), update your provisioning workflow to completely remove the Microsoft.Media registration e.g., add “skip_provider_registration = "true” to your Terraform code.
- The following PowerShell script can be used. If executed from the CloudShell available on Azure Portal, no local setup is necessary. This script should only be used as a one-off solution for the current issue. This script uses a region-specific ARM endpoint, and this usage pattern is strongly discouraged for any other workflow.
$subscriptionId = ""; # replace with subscription GUID
Connect-AzAccount; # Not needed if running from Cloud Shell on Azure Portal
$token = (Get-AzAccessToken).Token;
$res = Invoke-WebRequest https://northcentralus.management.azure.com/subscriptions/$subscriptionId/providers/microsoft.media/register?api-version=2021-04-01 -Headers @{ 'Authorization' = "Bearer $token" } -Method Post;
#Validate registration state. It can take a couple of mins for registration to complete.
$provider = Invoke-WebRequest https://management.azure.com/subscriptions/$subscriptionId/providers/microsoft.media?api-version=2021-04-01 -Headers @{ 'Authorization' = "Bearer $token" };
($provider.Content | ConvertFrom-Json).registrationstate # Should print out Registered