Skip to content

{"error":{"code":"DeploymentNotFound","message":"Deployment 'deploymentName-***' could not be found."}} #28834

@backwind1233

Description

@backwind1233

Describe the bug

The Azure Cli output "{"error":{"code":"DeploymentNotFound","message":"Deployment 'deploymentName-***' could not be found."}}"

but actually it has deployed successfully, and when I check in the Azure Portal, there is no error.

How to reproduce

  1. Download and Unzip the file: test_guid.bicep.zip, you will get test_guid.bicep

  2. Run following steps from Step-1 to Step-3

    Step-1 ---------------------------------------------------------

    export RESOURCE_GROUP=test-resource-group-$(date +%s)
    export deploymentName=deploymentName-$(date +%s)
    
    az group create --name $RESOURCE_GROUP -l eastus  
    az deployment group create --name ${deploymentName}eastus -f test_guid.bicep -g $RESOURCE_GROUP 
    

    Step-2 ---------------------------------------------------------

    az group delete --name $RESOURCE_GROUP --yes 

    Step-3 ---------------------------------------------------------

    az group create --name $RESOURCE_GROUP -l westus
    az deployment group create --name ${deploymentName}westus -f test_guid.bicep -g $RESOURCE_GROUP  --debug

Related command

NA

Errors

{"error":{"code":"DeploymentNotFound","message":"Deployment 'deploymentName-***' could not be found."}}

Issue script & Debug output

cli.knack.cli: Command arguments: ['deployment', 'group', 'create', '--name', 'deploymentName-1714056289westus', '-f', 'test_guid.bicep', '-g', 'test-resource-group-1714056289', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x1048eb9a0>, <function OutputProducer.on_global_arguments at 0x104a41ab0>, <function CLIQuery.on_global_arguments at 0x104e6add0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'deployment': ['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.111 51 228
cli.azure.cli.core: Total (1) 0.111 51 228
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: Total (0) 0.000 0 0
cli.azure.cli.core: Loaded 51 groups, 228 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : deployment group create
cli.azure.cli.core: Command table: deployment group create
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x105c9b9a0>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/Users/backwind1233/.azure/commands/2024-04-25.22-47-46.deployment_group_create.99220.log'.
az_command_data_logger: command args: deployment group create --name {} -f {} -g {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x105d58550>]
cli.knack.commands: Configured default 'rg-aks' for arg resource_group_name
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x105d5ae60>, <function register_cache_arguments..add_cache_arguments at 0x105d5af80>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x104a41b40>, <function CLIQuery.handle_query_parameter at 0x104e6ae60>, <function register_ids_argument..parse_ids_arguments at 0x105d5aef0>]
cli.azure.cli.command_modules.resource._bicep: Current value of "use_binary_from_path": false.
cli.azure.cli.command_modules.resource._bicep: Bicep CLI installation path: /Users/backwind1233/.azure/bin/bicep
cli.azure.cli.command_modules.resource._bicep: Bicep CLI installed: True.
urllib3.connectionpool: Starting new HTTPS connection (1): aka.ms:443
urllib3.connectionpool: https://aka.ms:443 "GET /BicepLatestRelease HTTP/1.1" 301 0
urllib3.connectionpool: Starting new HTTPS connection (1): downloads.bicep.azure.com:443
urllib3.connectionpool: https://downloads.bicep.azure.com:443 "GET /releases/latest HTTP/1.1" 200 36279
cli.azure.cli.command_modules.resource._bicep: A new Bicep release is available: v0.26.170. Upgrade now by running "az bicep upgrade".
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=ResourceManagementClient
cli.azure.cli.core.auth.persistence: build_persistence: location='/Users/backwind1233/.azure/msal_token_cache.json', encrypt=False
cli.azure.cli.core.auth.binary_cache: load: /Users/backwind1233/.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/28fbd091-25d8-4f39-b23d-aa4405e040ba/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/28fbd091-25d8-4f39-b23d-aa4405e040ba/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/28fbd091-25d8-4f39-b23d-aa4405e040ba/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/28fbd091-25d8-4f39-b23d-aa4405e040ba/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/28fbd091-25d8-4f39-b23d-aa4405e040ba/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/28fbd091-25d8-4f39-b23d-aa4405e040ba/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/28fbd091-25d8-4f39-b23d-aa4405e040ba/kerberos', 'tenant_region_scope': 'AS', '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? None
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: cb4d80b7-8357-48f8-851b-91c2d2b17bfa
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/******/resourcegroups/test-resource-group-1714056289/providers/Microsoft.Resources/deployments/deploymentName-1714056289westus/validate?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: 'Content-Length': '926'
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'c76bb822-0312-11ef-8e7e-9a48581aa92c'
cli.azure.cli.core.sdk.policies: 'CommandName': 'deployment group create'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--name -f -g --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.59.0 (PIP) azsdk-python-core/1.28.0 Python/3.10.14 (macOS-14.4-arm64-arm-64bit)'
cli.azure.cli.core.sdk.policies: 'Authorization': ''
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: {"properties": {"template": "{\n "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\",\n "contentVersion": "1.0.0.0",\n "metadata": {\n "_generator": {\n "name": "bicep",\n "version": "0.22.6.54827",\n "templateHash": "1501688143036687448"\n }\n },\n "parameters": {\n "guidValue": {\n "type": "string",\n "defaultValue": "[newGuid()]"\n }\n },\n "variables": {\n "name_deployment": "[format('deployment-{0}', substring(uniqueString(parameters('guidValue')), 0, 5))]"\n },\n "resources": [],\n "outputs": {\n "output_name_value": {\n "type": "string",\n "value": "[variables('name_deployment')]"\n },\n "guidValue_value": {\n "type": "string",\n "value": "[parameters('guidValue')]"\n }\n }\n}", "parameters": {}, "mode": "Incremental"}}
cli.azure.cli.command_modules.resource.custom: HTTP content is being overwritten to preserve template whitepace accurately. The request body logging may not accurately represent this.
urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
urllib3.connectionpool: https://management.azure.com:443 "POST /subscriptions/
/resourcegroups/test-resource-group-1714056289/providers/Microsoft.Resources/deployments/deploymentName-1714056289westus/validate?api-version=2022-09-01 HTTP/1.1" 200 624
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: 'Content-Length': '624'
cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json; charset=utf-8'
cli.azure.cli.core.sdk.policies: 'Expires': '-1'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-writes': '1199'
cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '2fcc8df6-83aa-45c7-9215-ac3d07474f81'
cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '2fcc8df6-83aa-45c7-9215-ac3d07474f81'
cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'EASTASIA:20240425T144757Z:2fcc8df6-83aa-45c7-9215-ac3d07474f81'
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: 'X-Cache': 'CONFIG_NOCACHE'
cli.azure.cli.core.sdk.policies: 'X-MSEdge-Ref': 'Ref A: 9D4C7F36093F4775AAAB1917C0D420CD Ref B: SEL221051503009 Ref C: 2024-04-25T14:47:55Z'
cli.azure.cli.core.sdk.policies: 'Date': 'Thu, 25 Apr 2024 14:47:57 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"id":"/subscriptions/
/resourceGroups/test-resource-group-1714056289/providers/Microsoft.Resources/deployments/deploymentName-1714056289westus","name":"deploymentName-1714056289westus","type":"Microsoft.Resources/deployments","properties":{"templateHash":"1501688143036687448","parameters":{"guidValue":{"type":"String","value":"07418d61-7d85-4d89-934d-590702bf6b92"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"0001-01-01T00:00:00Z","duration":"PT0S","correlationId":"2fcc8df6-83aa-45c7-9215-ac3d07474f81","providers":[],"dependencies":[],"validatedResources":[]}}
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/******/resourcegroups/test-resource-group-1714056289/providers/Microsoft.Resources/deployments/deploymentName-1714056289westus?api-version=2022-09-01'
cli.azure.cli.core.sdk.policies: Request method: 'PUT'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json'
cli.azure.cli.core.sdk.policies: 'Content-Length': '926'
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'c76bb822-0312-11ef-8e7e-9a48581aa92c'
cli.azure.cli.core.sdk.policies: 'CommandName': 'deployment group create'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--name -f -g --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.59.0 (PIP) azsdk-python-core/1.28.0 Python/3.10.14 (macOS-14.4-arm64-arm-64bit)'
cli.azure.cli.core.sdk.policies: 'Authorization': '
'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: {"properties": {"template": "{\n "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\",\n "contentVersion": "1.0.0.0",\n "metadata": {\n "_generator": {\n "name": "bicep",\n "version": "0.22.6.54827",\n "templateHash": "1501688143036687448"\n }\n },\n "parameters": {\n "guidValue": {\n "type": "string",\n "defaultValue": "[newGuid()]"\n }\n },\n "variables": {\n "name_deployment": "[format('deployment-{0}', substring(uniqueString(parameters('guidValue')), 0, 5))]"\n },\n "resources": [],\n "outputs": {\n "output_name_value": {\n "type": "string",\n "value": "[variables('name_deployment')]"\n },\n "guidValue_value": {\n "type": "string",\n "value": "[parameters('guidValue')]"\n }\n }\n}", "parameters": {}, "mode": "Incremental"}}
cli.azure.cli.command_modules.resource.custom: HTTP content is being overwritten to preserve template whitepace accurately. The request body logging may not accurately represent this.
urllib3.connectionpool: https://management.azure.com:443 "PUT /subscriptions//resourcegroups/test-resource-group-1714056289/providers/Microsoft.Resources/deployments/deploymentName-1714056289westus?api-version=2022-09-01 HTTP/1.1" 201 614
cli.azure.cli.core.sdk.policies: Response status: 201
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: 'Content-Length': '614'
cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json; charset=utf-8'
cli.azure.cli.core.sdk.policies: 'Expires': '-1'
cli.azure.cli.core.sdk.policies: 'Azure-AsyncOperation': 'https://management.azure.com/subscriptions/******/resourcegroups/test-resource-group-1714056289/providers/Microsoft.Resources/deployments/deploymentName-1714056289westus/operationStatuses/08584875504054618138?api-version=2022-09-01'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-writes': '1199'
cli.azure.cli.core.sdk.policies: 'x-ms-request-id': 'a57bfd58-d52d-4a64-8b1d-39eb86829bcf'
cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': 'a57bfd58-d52d-4a64-8b1d-39eb86829bcf'
cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'EASTASIA:20240425T144802Z:a57bfd58-d52d-4a64-8b1d-39eb86829bcf'
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: 'X-Cache': 'CONFIG_NOCACHE'
cli.azure.cli.core.sdk.policies: 'X-MSEdge-Ref': 'Ref A: 42FC6E6BBD854431BDD8BBC9840D6DDF Ref B: SEL221051503009 Ref C: 2024-04-25T14:47:58Z'
cli.azure.cli.core.sdk.policies: 'Date': 'Thu, 25 Apr 2024 14:48:01 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"id":"/subscriptions/
/resourceGroups/test-resource-group-1714056289/providers/Microsoft.Resources/deployments/deploymentName-1714056289westus","name":"deploymentName-1714056289westus","type":"Microsoft.Resources/deployments","properties":{"templateHash":"1501688143036687448","parameters":{"guidValue":{"type":"String","value":"2bb4fde9-6d49-449b-8210-912c6aa4bb03"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2024-04-25T14:48:01.085805Z","duration":"PT0.0008479S","correlationId":"a57bfd58-d52d-4a64-8b1d-39eb86829bcf","providers":[],"dependencies":[]}}
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/******/resourcegroups/test-resource-group-1714056289/providers/Microsoft.Resources/deployments/deploymentName-1714056289westus/operationStatuses/08584875504054618138?api-version=2022-09-01'
cli.azure.cli.core.sdk.policies: Request method: 'GET'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'c76bb822-0312-11ef-8e7e-9a48581aa92c'
cli.azure.cli.core.sdk.policies: 'CommandName': 'deployment group create'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--name -f -g --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.59.0 (PIP) azsdk-python-core/1.28.0 Python/3.10.14 (macOS-14.4-arm64-arm-64bit)'
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: https://management.azure.com:443 "GET /subscriptions/
*/resourcegroups/test-resource-group-1714056289/providers/Microsoft.Resources/deployments/deploymentName-1714056289westus/operationStatuses/08584875504054618138?api-version=2022-09-01 HTTP/1.1" 404 116
cli.azure.cli.core.sdk.policies: Response status: 404
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: 'Content-Length': '116'
cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json; charset=utf-8'
cli.azure.cli.core.sdk.policies: 'Expires': '-1'
cli.azure.cli.core.sdk.policies: 'x-ms-failure-cause': 'gateway'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-reads': '11999'
cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '01f21855-45a7-4191-bd45-5e5563eaa14f'
cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '01f21855-45a7-4191-bd45-5e5563eaa14f'
cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'EASTASIA:20240425T144802Z:01f21855-45a7-4191-bd45-5e5563eaa14f'
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: 'X-Cache': 'CONFIG_NOCACHE'
cli.azure.cli.core.sdk.policies: 'X-MSEdge-Ref': 'Ref A: C036B2D3BEDA4B7F8366CBEE8135D054 Ref B: SEL221051503009 Ref C: 2024-04-25T14:48:02Z'
cli.azure.cli.core.sdk.policies: 'Date': 'Thu, 25 Apr 2024 14:48:02 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"error":{"code":"DeploymentNotFound","message":"Deployment 'deploymentName-1714056289westus' could not be found."}}
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "/opt/homebrew/lib/python3.10/site-packages/azure/core/polling/base_polling.py", line 730, in run
self._poll()
File "/opt/homebrew/lib/python3.10/site-packages/azure/core/polling/base_polling.py", line 756, in _poll
self.update_status()
File "/opt/homebrew/lib/python3.10/site-packages/azure/core/polling/base_polling.py", line 782, in update_status
_raise_if_bad_http_status_and_method(self._pipeline_response.http_response)
File "/opt/homebrew/lib/python3.10/site-packages/azure/core/polling/base_polling.py", line 156, in _raise_if_bad_http_status_and_method
raise BadStatus("Invalid return status {!r} for {!r} operation".format(code, response.request.method))
azure.core.polling.base_polling.BadStatus: Invalid return status 404 for 'GET' operation

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/homebrew/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 712, in _run_job
result = LongRunningOperation(cmd_copy.cli_ctx, 'Starting {}'.format(cmd_copy.name))(result)
File "/opt/homebrew/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 1048, in call
raise exception
File "/opt/homebrew/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 1035, in call
result = poller.result()
File "/opt/homebrew/lib/python3.10/site-packages/azure/core/polling/_poller.py", line 242, in result
self.wait(timeout)
File "/opt/homebrew/lib/python3.10/site-packages/azure/core/tracing/decorator.py", line 76, in wrapper_use_tracer
return func(*args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/azure/core/polling/_poller.py", line 261, in wait
raise self._exception # type: ignore
File "/opt/homebrew/lib/python3.10/site-packages/azure/core/polling/_poller.py", line 176, in _start
self._polling_method.run()
File "/opt/homebrew/lib/python3.10/site-packages/azure/core/polling/base_polling.py", line 734, in run
raise HttpResponseError(response=self._pipeline_response.http_response, error=err) from err
azure.core.exceptions.HttpResponseError: (DeploymentNotFound) Deployment 'deploymentName-1714056289westus' could not be found.
Code: DeploymentNotFound
Message: Deployment 'deploymentName-1714056289westus' could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/homebrew/lib/python3.10/site-packages/azure/cli/core/commands/arm.py", line 109, in handle_template_based_exception
raise CLIError(ex.inner_exception.error.message)
AttributeError: 'BadStatus' object has no attribute 'error'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/homebrew/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/homebrew/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 664, in execute
raise ex
File "/opt/homebrew/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 731, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/homebrew/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 723, in _run_job
return cmd_copy.exception_handler(ex)
File "/opt/homebrew/lib/python3.10/site-packages/azure/cli/core/commands/arm.py", line 112, in handle_template_based_exception
raise_subdivision_deployment_error(ex.response.internal_response.text, ex.error.code if ex.error else None)
File "/opt/homebrew/lib/python3.10/site-packages/azure/cli/core/commands/arm.py", line 104, in raise_subdivision_deployment_error
raise DeploymentError(error_message)
azure.cli.core.azclierror.DeploymentError: {"error":{"code":"DeploymentNotFound","message":"Deployment 'deploymentName-1714056289westus' could not be found."}}

cli.azure.cli.core.azclierror: {"error":{"code":"DeploymentNotFound","message":"Deployment 'deploymentName-1714056289westus' could not be found."}}
az_command_data_logger: {"error":{"code":"DeploymentNotFound","message":"Deployment 'deploymentName-1714056289westus' could not be found."}}
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x105c9bbe0>]
az_command_data_logger: exit code: 1
cli.main: Command ran in 12.416 seconds (init: 0.136, invoke: 12.280)
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 3936 in cache
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/opt/homebrew/opt/python@3.10/bin/python3.10 /opt/homebrew/lib/python3.10/site-packages/azure/cli/telemetry/init.py /Users/backwind1233/.azure"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.

Expected behavior

Everything is ok.

Environment Summary

azure-cli 2.59.0

core 2.59.0
telemetry 1.1.0

Extensions:
account 0.2.5
application-insights 1.2.1
containerapp 0.3.50
interactive 0.5.3
rdbms-connect 1.0.5
resource-graph 2.1.0
serviceconnector-passwordless 1.0.3
spring 1.21.0
spring-cloud 3.1.8

Dependencies:
msal 1.27.0
azure-mgmt-resource 23.1.0b2

Python location '/opt/homebrew/opt/python@3.10/bin/python3.10'
Extensions directory '/Users/backwind1233/.azure/cliextensions'

Python (Darwin) 3.10.14 (main, Mar 19 2024, 21:46:16) [Clang 15.0.0 (clang-1500.3.9.4)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

No response

Metadata

Metadata

Assignees

Labels

ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupAuto-AssignAuto assign by botAzure Deploymentsaz deployment/bicep/stack/deployment-scripts/ts/group exportService AttentionThis issue is responsible by Azure service team.act-codegen-extensibility-squadact-identity-squadquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions