Azure / azure-cli

Azure Command-Line Interface
MIT License
3.99k stars 2.96k forks source link

Microsoft.media provider stuck in "registering" #27798

Open APEX-DUSAN-ZAKIC opened 11 months ago

APEX-DUSAN-ZAKIC commented 11 months ago

Describe the bug

We are trying to deploy azure-caf-enterprise-scale and the init was fine. The problems occurs with the policy definitions, it get's stuck on one of the providers. This occurs while we are doing a Terraform plan, and after we cancel the plan we noticed an error message. We created three new subscriptions and we notived that on the management one it's trying to register the Microsoft.media provider, even though we didn't request this after the creation and we only did Terraform plan afterwards. Is this expected and why is it stuck at registering on this particular provider?

Related command

az provider register --namespace microsoft.media

Errors

Plan: 224 to add, 0 to change, 0 to destroy. ╷ │ Error: Error ensuring Resource Providers are registered. │ │ Terraform automatically attempts to register the Resource Providers it supports to │ ensure it's able to provision resources. │ │ If you don't have permission to register Resource Providers you may wish to use the │ "skip_provider_registration" flag in the Provider block to disable this functionality. │ │ Please note that if you opt out of Resource Provider Registration and Terraform tries │ to provision a resource from a Resource Provider which is unregistered, then the errors │ may appear misleading - for example: │ │ > API version 2019-XX-XX was not found for Microsoft.Foo │ │ Could indicate either that the Resource Provider "Microsoft.Foo" requires registration, │ but this could also indicate that this Azure Region doesn't support this API version. │ │ More information on the "skip_provider_registration" flag can be found here: │ https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs#skip_provider_registration │ │ Original Error: Cannot register providers: Microsoft.Media. Errors were: waiting for Subscription Provider (Subscription: "6dadd044-b342-48fc-b7ac-0a742955e576" │ Provider Name: "Microsoft.Media") to be registered: context canceled │ │ with provider["registry.terraform.io/hashicorp/azurerm"].connectivity, │ on providers.tf line 17, in provider "azurerm": │ 17: provider "azurerm" { │ ╵ ╷ │ Error: Error ensuring Resource Providers are registered. │ │ Terraform automatically attempts to register the Resource Providers it supports to │ ensure it's able to provision resources. │ │ If you don't have permission to register Resource Providers you may wish to use the │ "skip_provider_registration" flag in the Provider block to disable this functionality. │ │ Please note that if you opt out of Resource Provider Registration and Terraform tries │ to provision a resource from a Resource Provider which is unregistered, then the errors │ may appear misleading - for example: │ │ > API version 2019-XX-XX was not found for Microsoft.Foo │ │ Could indicate either that the Resource Provider "Microsoft.Foo" requires registration, │ but this could also indicate that this Azure Region doesn't support this API version. │ │ More information on the "skip_provider_registration" flag can be found here: │ https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs#skip_provider_registration │ │ Original Error: Cannot register providers: Microsoft.Media. Errors were: waiting for Subscription Provider (Subscription: "1a6c15e7-2b1a-4ae4-a829-64945b37e408" │ Provider Name: "Microsoft.Media") to be registered: context canceled │ │ with provider["registry.terraform.io/hashicorp/azurerm"].management, │ on providers.tf line 23, in provider "azurerm": │ 23: provider "azurerm" {

Issue script & Debug output

cli.knack.cli: Command arguments: ['provider', 'register', '--namespace', 'microsoft.media', '--debug'] cli.knack.cli: init debug log: Enable color in terminal. Enable VT mode. cli.knack.cli: Event: Cli.PreExecute [] cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x000001D3E3A15240>, <function OutputProducer.on_global_arguments at 0x000001D3E3B5FEB0>, <function CLIQuery.on_global_arguments at 0x000001D3E3DAD240>] cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate [] cli.azure.cli.core: Modules found from index for 'provider': ['azure.cli.command_modules.resource'] cli.azure.cli.core: Loading command modules: cli.azure.cli.core: Name Load Time Groups Commands cli.azure.cli.core: resource 0.335 51 227 cli.azure.cli.core: Total (1) 0.335 51 227 cli.azure.cli.core: Loaded 51 groups, 227 commands. cli.azure.cli.core: Found a match in the command table. cli.azure.cli.core: Raw command : provider register cli.azure.cli.core: Command table: provider register cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x000001D3E64503A0>] cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\dusan.zakic.azure\commands\2023-11-07.13-58-59.provider_register.9564.log'. az_command_data_logger: command args: provider register --namespace {} --debug cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x000001D3E6453010>] cli.azure.cli.core.profiles._shared: Traceback (most recent call last): File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/profiles/_shared.py", line 655, in _get_attr AttributeError: module 'azure.mgmt.resource.resources.v2022_09_01.models' has no attribute 'ExemptionCategory'

cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad [] cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x000001D3E64A9000>, <function register_cache_arguments..add_cache_arguments at 0x000001D3E64A9120>] cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded [] cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [] cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x000001D3E3B5FF40>, <function CLIQuery.handle_query_parameter at 0x000001D3E3DAD2D0>, <function register_ids_argument..parse_ids_arguments at 0x000001D3E64A9090>] cli.azure.cli.core.commands.client_factory: Getting management service client client_type=ResourceManagementClient cli.azure.cli.core.auth.persistence: build_persistence: location='C:\Users\dusan.zakic\.azure\msal_token_cache.bin', encrypt=True cli.azure.cli.core.auth.binary_cache: load: C:\Users\dusan.zakic.azure\msal_http_cache.bin urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None) msal.authority: openid_config = {'token_endpoint': 'https://login.microsoftonline.com/5442ad35-e3c2-4ad7-ad38-e30286b48083/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/5442ad35-e3c2-4ad7-ad38-e30286b48083/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/5442ad35-e3c2-4ad7-ad38-e30286b48083/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/5442ad35-e3c2-4ad7-ad38-e30286b48083/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/5442ad35-e3c2-4ad7-ad38-e30286b48083/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/5442ad35-e3c2-4ad7-ad38-e30286b48083/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/5442ad35-e3c2-4ad7-ad38-e30286b48083/kerberos', 'tenant_region_scope': 'EU', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'} msal.application: Broker enabled? False cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={} cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={} msal.application: Cache hit an AT msal.telemetry: Generate or reuse correlation_id: 113cfb18-4869-4f3b-9fc3-48db0a249be5 cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/1a6c15e7-2b1a-4ae4-a829-64945b37e408/providers/microsoft.media/register?api-version=2022-09-01' cli.azure.cli.core.sdk.policies: Request method: 'POST' cli.azure.cli.core.sdk.policies: Request headers: cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json' cli.azure.cli.core.sdk.policies: 'Accept': 'application/json' cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': '6ad723c8-7d6d-11ee-9e36-44af28c6141f' cli.azure.cli.core.sdk.policies: 'CommandName': 'provider register' cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--namespace --debug' cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.53.1 (MSI) azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.10 (Windows-10-10.0.19042-SP0)' cli.azure.cli.core.sdk.policies: 'Authorization': '*****' cli.azure.cli.core.sdk.policies: Request body: cli.azure.cli.core.sdk.policies: This request has no body urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443 urllib3.connectionpool: https://management.azure.com:443 "POST /subscriptions/1a6c15e7-2b1a-4ae4-a829-64945b37e408/providers/microsoft.media/register?api-version=2022-09-01 HTTP/1.1" 200 None cli.azure.cli.core.sdk.policies: Response status: 200 cli.azure.cli.core.sdk.policies: Response headers: cli.azure.cli.core.sdk.policies: 'Cache-Control': 'no-cache' cli.azure.cli.core.sdk.policies: 'Pragma': 'no-cache' cli.azure.cli.core.sdk.policies: 'Transfer-Encoding': 'chunked' cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json; charset=utf-8' cli.azure.cli.core.sdk.policies: 'Content-Encoding': 'gzip' cli.azure.cli.core.sdk.policies: 'Expires': '-1' cli.azure.cli.core.sdk.policies: 'Vary': 'Accept-Encoding' cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-writes': '1199' cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '8e6fc801-a393-4566-a43e-fc71053d4bb4' cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '8e6fc801-a393-4566-a43e-fc71053d4bb4' cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'NORTHEUROPE:20231107T125901Z:8e6fc801-a393-4566-a43e-fc71053d4bb4' cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains' cli.azure.cli.core.sdk.policies: 'X-Content-Type-Options': 'nosniff' cli.azure.cli.core.sdk.policies: 'Date': 'Tue, 07 Nov 2023 12:59:01 GMT' cli.azure.cli.core.sdk.policies: Response content: cli.azure.cli.core.sdk.policies: {"id":"/subscriptions/1a6c15e7-2b1a-4ae4-a829-64945b37e408/providers/Microsoft.Media","namespace":"Microsoft.Media","authorization":{"applicationId":"374b2a64-3b6b-436b-934c-b820eacca870","roleDefinitionId":"aab70789-0cec-44b5-95d7-84b64c9487af"},"resourceTypes":[{"resourceType":"mediaservices","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2023-01-01","2021-11-01","2021-06-01","2021-05-01","2020-05-01","2018-07-01","2018-06-01-preview","2018-03-30-preview","2015-10-01","2015-04-01"],"defaultApiVersion":"2021-06-01","capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity, SupportsTags, SupportsLocation"},{"resourceType":"videoAnalyzers","locations":["Japan East","Southeast Asia","West Europe","North Europe","Australia East","East US 2","Central India","West US 2","Korea Central"],"apiVersions":["2021-11-01-preview","2021-05-01-privatepreview","2021-05-01-preview"],"defaultApiVersion":"2021-05-01-preview","capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"mediaservices/assets","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2023-01-01","2022-08-01","2021-11-01","2021-06-01","2020-05-01","2018-07-01","2018-06-01-preview","2018-03-30-preview"],"defaultApiVersion":"2018-07-01","capabilities":"None"},{"resourceType":"mediaservices/assets/tracks","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2023-01-01","2022-08-01","2021-11-01"],"defaultApiVersion":"2021-11-01","capabilities":"None"},{"resourceType":"mediaservices/assets/tracks/operationstatuses","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2023-01-01","2022-08-01","2021-11-01"],"defaultApiVersion":"2021-11-01","capabilities":"None"},{"resourceType":"mediaservices/assets/tracks/operationResults","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2023-01-01","2022-08-01","2021-11-01"],"defaultApiVersion":"2021-11-01","capabilities":"None"},{"resourceType":"mediaservices/contentKeyPolicies","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2023-01-01","2022-08-01","2021-11-01","2021-06-01","2020-05-01","2018-07-01","2018-06-01-preview","2018-03-30-preview"],"defaultApiVersion":"2018-07-01","capabilities":"None"},{"resourceType":"mediaservices/streamingLocators","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2023-01-01","2022-08-01","2021-11-01","2021-06-01","2020-05-01","2018-07-01","2018-06-01-preview","2018-03-30-preview"],"defaultApiVersion":"2018-07-01","capabilities":"None"},{"resourceType":"mediaservices/streamingPolicies","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2023-01-01","2022-08-01","2021-11-01","2021-06-01","2020-05-01","2018-07-01","2018-06-01-preview","2018-03-30-preview"],"defaultApiVersion":"2018-07-01","capabilities":"None"},{"resourceType":"mediaservices/eventGridFilters","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2018-02-05"],"defaultApiVersion":"2018-02-05","capabilities":"None"},{"resourceType":"mediaservices/transforms","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2022-07-01","2022-05-01-preview","2021-11-01","2021-06-01","2020-05-01","2018-07-01","2018-06-01-preview","2018-03-30-preview"],"defaultApiVersion":"2018-07-01","capabilities":"None"},{"resourceType":"mediaservices/transforms/jobs","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2022-07-01","2022-05-01-preview","2021-11-01","2021-06-01","2020-05-01","2018-07-01","2018-06-01-preview","2018-03-30-preview"],"defaultApiVersion":"2018-07-01","capabilities":"None"},{"resourceType":"mediaservices/streamingEndpoints","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2022-11-01","2022-08-01","2021-11-01","2021-06-01","2020-05-01","2019-05-01-preview","2018-07-01","2018-06-01-preview","2018-03-30-preview"],"defaultApiVersion":"2018-07-01","capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"mediaservices/liveEvents","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2022-11-01","2022-08-01","2021-11-01","2021-06-01","2020-05-01","2019-05-01-preview","2018-07-01","2018-06-01-preview","2018-03-30-preview"],"defaultApiVersion":"2018-07-01","capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"mediaservices/liveEvents/liveOutputs","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2022-11-01","2022-08-01","2021-11-01","2021-06-01","2020-05-01","2019-05-01-preview","2018-07-01","2018-06-01-preview","2018-03-30-preview"],"defaultApiVersion":"2018-07-01","capabilities":"None"},{"resourceType":"mediaservices/streamingEndpointOperations","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2022-11-01","2022-08-01","2021-11-01","2021-06-01","2020-05-01","2019-05-01-preview","2018-07-01","2018-06-01-preview","2018-03-30-preview"],"defaultApiVersion":"2018-07-01","capabilities":"None"},{"resourceType":"mediaservices/liveEventOperations","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2022-11-01","2022-08-01","2021-11-01","2021-06-01","2020-05-01","2019-05-01-preview","2018-07-01","2018-06-01-preview","2018-03-30-preview"],"defaultApiVersion":"2018-07-01","capabilities":"None"},{"resourceType":"mediaservices/liveOutputOperations","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2022-11-01","2022-08-01","2021-11-01","2021-06-01","2020-05-01","2019-05-01-preview","2018-07-01","2018-06-01-preview","2018-03-30-preview"],"defaultApiVersion":"2018-07-01","capabilities":"None"},{"resourceType":"mediaservices/streamingendpoints/operationlocations","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2022-11-01","2022-08-01","2021-11-01","2021-06-01","2020-05-01","2019-05-01-preview","2018-07-01","2018-06-01-preview","2018-03-30-preview"],"defaultApiVersion":"2018-07-01","capabilities":"None"},{"resourceType":"mediaservices/liveevents/operationlocations","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2022-11-01","2022-08-01","2021-11-01","2021-06-01","2020-05-01","2019-05-01-preview","2018-07-01","2018-06-01-preview","2018-03-30-preview"],"defaultApiVersion":"2018-07-01","capabilities":"None"},{"resourceType":"mediaservices/liveevents/liveoutputs/operationlocations","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2022-11-01","2022-08-01","2021-11-01","2021-06-01","2020-05-01","2019-05-01-preview","2018-07-01","2018-06-01-preview","2018-03-30-preview"],"defaultApiVersion":"2018-07-01","capabilities":"None"},{"resourceType":"mediaservices/privateEndpointConnectionProxies","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2023-01-01","2021-11-01","2021-06-01","2021-05-01","2020-05-01"],"defaultApiVersion":"2020-05-01","capabilities":"None"},{"resourceType":"mediaservices/privateEndpointConnections","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2023-01-01","2021-11-01","2021-06-01","2021-05-01","2020-05-01"],"defaultApiVersion":"2020-05-01","capabilities":"None"},{"resourceType":"mediaservices/privateEndpointConnectionOperations","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2023-01-01","2021-11-01","2021-06-01","2021-05-01","2020-05-01"],"defaultApiVersion":"2020-05-01","capabilities":"None"},{"resourceType":"locations/mediaServicesOperationStatuses","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2023-01-01","2021-11-01","2021-06-01","2021-05-01","2020-05-01","2018-07-01","2018-06-01-preview","2018-03-30-preview","2015-10-01","2015-04-01"],"defaultApiVersion":"2021-11-01","capabilities":"None"},{"resourceType":"locations/mediaServicesOperationResults","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2023-01-01","2021-11-01","2021-06-01","2021-05-01","2020-05-01","2018-07-01","2018-06-01-preview","2018-03-30-preview","2015-10-01","2015-04-01"],"defaultApiVersion":"2021-11-01","capabilities":"None"},{"resourceType":"mediaservices/assets/assetFilters","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2023-01-01","2022-08-01","2021-11-01","2021-06-01","2020-05-01","2018-07-01"],"defaultApiVersion":"2018-07-01","capabilities":"None"},{"resourceType":"mediaservices/accountFilters","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2023-01-01","2022-08-01","2021-11-01","2021-06-01","2020-05-01","2018-07-01"],"defaultApiVersion":"2018-07-01","capabilities":"None"},{"resourceType":"operations","locations":[],"apiVersions":["2023-01-01","2021-11-01-preview","2021-11-01","2021-06-01","2021-05-01-privatepreview","2021-05-01-preview","2021-05-01","2020-05-01","2018-07-01","2018-06-01-preview","2018-03-30-preview","2018-02-05","2016-05-01-preview","2015-10-01","2015-04-01"],"defaultApiVersion":"2020-05-01","capabilities":"None"},{"resourceType":"checknameavailability","locations":[],"apiVersions":["2015-10-01","2015-04-01"],"defaultApiVersion":"2015-10-01","capabilities":"None"},{"resourceType":"locations","locations":[],"apiVersions":["2023-01-01","2021-11-01-preview","2021-11-01","2021-06-01","2021-05-01-privatepreview","2021-05-01-preview","2021-05-01","2020-05-01","2018-07-01","2018-06-01-preview","2018-03-30-preview","2016-05-01-preview"],"defaultApiVersion":"2018-07-01","capabilities":"None"},{"resourceType":"locations/checkNameAvailability","locations":["Japan West","Japan East","East Asia","Southeast Asia","West Europe","North Europe","East US","West US","Australia East","Australia Southeast","East US 2","Central US","Brazil South","Central India","West India","South India","North Central US","South Central US","UK South","UK West","Canada Central","Canada East","West Central US","West US 2","Korea Central","Korea South","France Central","France South","South Africa North","South Africa West","UAE Central","UAE North","Germany West Central","Germany North","Switzerland West","Switzerland North","Norway East","West US 3","Sweden Central"],"apiVersions":["2023-01-01","2021-11-01-preview","2021-11-01","2021-06-01","2021-05-01-privatepreview","2021-05-01-preview","2021-05-01","2020-05-01","2018-07-01","2018-06-01-preview","2018-03-30-preview","2016-05-01-preview"],"defaultApiVersion":"2020-05-01","capabilities":"None"},{"resourceType":"locations/videoAnalyzerOperationStatuses","locations":["Southeast Asia","Australia East","North Europe","West Europe","Central India","Japan East","Korea Central","East US 2","West US 2"],"apiVersions":["2021-11-01-preview"],"defaultApiVersion":"2021-11-01-preview","capabilities":"None"},{"resourceType":"locations/videoAnalyzerOperationResults","locations":["Southeast Asia","Australia East","North Europe","West Europe","Central India","Japan East","Korea Central","East US 2","West US 2"],"apiVersions":["2021-11-01-preview"],"defaultApiVersion":"2021-11-01-preview","capabilities":"None"}],"registrationState":"Registering","registrationPolicy":"RegistrationRequired"} cli.azure.cli.command_modules.resource.custom: Registering is still on-going. You can monitor using 'az provider show -n microsoft.media' cli.knack.cli: Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x000001D3E647A440>, <function _x509_from_base64_to_hex_transform at 0x000001D3E647A4D0>] cli.knack.cli: Event: CommandInvoker.OnFilterResult [] cli.knack.cli: Event: Cli.SuccessfulExecute [] cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x000001D3E64505E0>] az_command_data_logger: exit code: 0 cli.main: Command ran in 3.385 seconds (init: 1.049, invoke: 2.335) telemetry.main: Begin splitting cli events and extra events, total events: 1 telemetry.client: Accumulated 0 events. Flush the clients. telemetry.main: Finish splitting cli events and extra events, cli events: 1 telemetry.save: Save telemetry record of length 3328 in cache telemetry.main: Begin creating telemetry upload process. telemetry.process: Creating upload process: "C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry__init__.pyc C:\Users\dusan.zakic.azure" telemetry.process: Return from creating process telemetry.main: Finish creating telemetry upload process.

Expected behavior

Terraform successfully registers the provider after running plan.

Environment Summary

Terraform 1.6.3 az cli 2.53.1

Additional context

No response

yonzhan commented 11 months ago

Thank you for opening this issue, we will look into it.

davetustin commented 11 months ago

I am also getting this problem with micosoft.media not registering during plan and the resource provider remaining stuck in registering in Azure.

mkkhg commented 11 months ago

The same issue here. Additionally, if you click "Unregister" in the portal it will stick in the "Unregistering" state. It seems it's not the issue with azcli itself, but something with the provider registration on Azure side.

rmxuser commented 11 months ago

I have the same issue. Running terraform plan I received the following:

Original Error: Cannot register providers: Microsoft.Media. Errors were: waiting for Subscription Provider (Subscription: "xxxxxxxxxxxxx" │ Provider Name: "Microsoft.Media") to be registered: context deadline exceeded

Mine here has been running the register command for almost 4 hours now.

microsoft-github-policy-service[bot] commented 11 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @josephkwchan, @jennyhunter-msft.

Phiph commented 11 months ago

Yeah I've just hit this too on a new subscription

mpalcak commented 11 months ago

Same here, I noted problem in new subscription today. Same terraform module works in "old" subscription but not in "new" one.
Problem is the same as @rmxuser describe - Microsoft.Media registration. I've manually registered service via azure CLI and verified the result. Media is registered but for some reason, issue persist. Thanks.

SerreRom commented 11 months ago

Hello,

Same problem here by using Terraform and Azure DevOps Pipeline. Registering is stuck for 4h now .

SerreRom commented 11 months ago

Hello again,

I found a workaround:

$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

Phiph commented 11 months ago

Nice workaround I'm going to give it a go now!

Looking in the network inspector when clicking register in the azure portal it seems to use the 2014-04-01 api.

{
"requests":[
{
"httpMethod":"POST",
"name":"{id}",
"requestHeaderDetails":{
"commandName":"Microsoft_Azure_Resources.RPStatus.registerRP"},
"url":"/subscriptions/{id}/providers/microsoft.media/register?api-version=2014-04-01-preview"}
]
}
saif-chaudhry commented 11 months ago

Hi , I'm hitting a same issue on a new subscription.

image

It remain stuck in

image

pjungwir commented 11 months ago

Still stuck in "Registering" over here even after trying @SerreRom 's suggestion.

Matthew0x commented 11 months ago

Microsoft.media stuck on "registering" state using Terraform. The same deployment runs perfectly in a different (older and already configured) subscription.

Seems to be an issue with the registering procedure. Timeouts on manual re-registering in the portal...

rmxuser commented 11 months ago

Thank you @SerreRom, but for me still in a stuck state for some reason:

image

For those who want to try, don't forget to change this URL to the location you usually deploy: " https://northcentralus.management.azure.com" Mine becomes: "https://uksouth.management.azure.com"

Not sure if it makes a difference, but northcentralus didn't work for me.

saif-chaudhry commented 11 months ago

haven't tried the workaround that is mentioned by @SerreRom but the api-version 2021-04-01 is not listed on the portal.

image

SerreRom commented 11 months ago

Thank you @SerreRom, but for me still in a stuck state for some reason:

image

For those who want to try, don't forget to change this URL to the location you usually deploy:

" https://northcentralus.management.azure.com" Mine becomes: "https://uksouth.management.azure.com"

Not sure if it makes a difference, but northcentralus didn't work for me.

I had the same thing but when I went into the portal it said that Microsoft.media was registered

APEX-DUSAN-ZAKIC commented 11 months ago

It finally switched to registered for me on all three new subscriptions. I will post an update if i have any more issues on new subscriptions that i will probably provision soon.

rmxuser commented 11 months ago

I can also confirm that the status has been changed to "registered" in the portal: image

saif-chaudhry commented 11 months ago

I left it for the night and now it is showing as registered as well for me.