Azure / Azure/azure-cli

"az resource delete" with --no-wait is waiting

Open
#29,175 2 comments 0 reactions 1 assignee Claimed by @zhoxing-ms View on GitHub
act-identity-squad ARM Auto-Assign Auto-Resolve Azure CLI Team customer-reported question Similar-Issue
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

When calling "az resource delete" with the `--no-wait` flag, I expect the command to exit within just a few seconds.

### Related command

> resource delete --no-wait --verbose --ids /subscriptions/0816a7b7-daf6-4f6a-8d35-0297a9da1f73/resourceGroups/sample-bankpr454-common/providers/Microsoft.ContainerService/managedClusters/aks-awsf

### Errors

The resource is deleted but the command takes a very long time, it is apparently waiting despite the `--no-wait` flag.

> INFO: Command ran in 183.362 seconds (init: 0.366, invoke: 182.996)

### Issue script & Debug output

NA

### Expected behavior

I expected it to exit after the delete command was issued and not wait for the resource to be done being destroying.

### Environment Summary

```
azure-cli 2.61.0

core 2.61.0
telemetry 1.1.0

Extensions:
account 0.2.5
alias 0.5.2
blueprint 0.3.1
databricks 0.10.2
resource-graph 2.1.0
storage-blob-preview 0.7.2

Dependencies:
msal 1.28.0
azure-mgmt-resource 23.1.1

Python location '/usr/local/Cellar/azure-cli/2.61.0/libexec/bin/python'
Extensions directory '/Users/jchase24/.azure/cliextensions'

Python (Darwin) 3.11.9 (main, Apr 2 2024, 08:25:04) [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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.