az monitor log-analytics workspace delete force does not work
See original GitHub issueDescribe 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
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Delete and recover Azure Log Analytics workspace
To permanently delete a workspace using the Azure portal, select the Delete the workspace permanently checkbox before clicking the Delete button ...
Read more >How to delete old Log-analytics-workspace permanently in ...
If you deleted in the portal the default behavior is a soft delete. To delete forcefully you need to run some powershell
Read more >azurerm_log_analytics_workspace | hashicorp/azurerm
delete - (Defaults to 30 minutes) Used when deleting the Log Analytics Workspace. Import. Log Analytics Workspaces can be imported using the resource...
Read more >Create a Log Analytics workspace and Manage access to log ...
Azure Monitor, on the other hand, keeps log data in a Log Analytics workspace. ... If you don't have access to customise the...
Read more >Purging Table Data from a log Analytics Workspace
I was working on a solution recently that uses Log Analytics to store ... It's certainly not as straight-forward as deleting data from...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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!