Azure-cli: az monitor log-analytics workspace delete force does not work

Created on 15 Jun 2020  路  5Comments  路  Source: Azure/azure-cli

Describe the bug

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:

To Reproduce:

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-logs
  • az monitor log-analytics workspace delete --resource-group pepito --workspace-name pepito-logs --force true --yes
  • az monitor log-analytics workspace list-deleted-workspaces | jq '.[].name'
  • pepito-logs appears on the output

Expected Behavior

The pepito-logs environment shouldn't appear on the list

Environment Summary

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

Additional Context


Monitor Service Attention

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.

All 5 comments

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!

Was this page helpful?
0 / 5 - 0 ratings