When an Azure LogAnalytics workspace is deleted, it gets soft-deleted by default, enabling us to restore it. However, we may want to to a hard delete, which is supported by REST API.
The --force flag should do that, but as you can see running the following commands, the workspace is soft-deleted.
Command Name
az monitor log-analytics workspace delete
Errors:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az monitor log-analytics workspace create --resource-group pepito --workspace-name pepito-logsaz monitor log-analytics workspace delete --resource-group pepito --workspace-name pepito-logs --force true --yesaz monitor log-analytics workspace list-deleted-workspaces | jq '.[].name'pepito-logs appears on the outputThe pepito-logs environment shouldn't appear on the list
macOS-10.15.4-x86_64-i386-64bit
Python 3.8.3
Installer: HOMEBREW
azure-cli 2.7.0
Extensions:
log-analytics 0.2.1
add to S172
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @SameergMS, @dadunl.
It's a known issue in service side and will update once service is fixed.
@aarroyoc , thanks for reporting. This is a known issue that was already fixed, and should be available in all regions by tomorrow.
All deleted workspaces are kept in the backend for 14 days until the data is purged. The difference between force and soft deletes is that for force we release the workspace name where in soft we keep it for you, since names are globally unique.
The bug was that we displayed force delete workspaces in the list instead of hiding them.
It seems to be working right now. Thanks!
Most helpful comment
@aarroyoc , thanks for reporting. This is a known issue that was already fixed, and should be available in all regions by tomorrow.
All deleted workspaces are kept in the backend for 14 days until the data is purged. The difference between force and soft deletes is that for force we release the workspace name where in soft we keep it for you, since names are globally unique.
The bug was that we displayed force delete workspaces in the list instead of hiding them.