Hi @Guido Imperatore
Thank you for posting this in Microsoft Q&A.
I understand you are trying to create new workspace but getting error "The limit of 5 diagnostic settings was reached. To create new setting 'SentinelExportSettings-sentinella', delete an existing one".
Each resource can have up to five diagnostic settings. so, if you have deployed and deleted workspace five times (without deleting the diagnostic settings), you will encounter this error the next time you deploy.
To resolve the issue, need to delete unused diagnostic you can be deleted from the Microsoft Entra admin center or using PowerShell commands.
Identify and Delete Unused Diagnostic Settings:
Get-AzSubscriptionDiagnosticSetting -Name test-setting
Remove-AzDiagnosticSetting -Name {setting-name} -ResourceId "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/{resource-provider}/{resource-name}"
But i delete all resources from subscription without delete Diagnostics settings, so i think this generate this problem ?
To delete a resource, rename, or move a resource, or migrate it across resource groups or subscriptions, first delete its diagnostic settings. Otherwise, if you recreate this resource, the diagnostic settings for the deleted resource could be included with the new resource, depending on the resource configuration for each resource.
Make sure there are no soft-deleted resources that might still hold diagnostic settings. You can check this in the Azure portal under the "Soft Delete" section. If the workspace is in soft-delete state, you must recover the workspace first and permanently delete it then.
For your reference: https://learn.microsoft.com/en-us/azure/azure-monitor/logs/delete-workspace?tabs=azure-portal#recover-a-workspace-in-a-soft-delete-state
If you are still encountering same issue, please send us an email on azcommunity@microsoft.com with Sub - "ATTN: Navya" and following details in the email body: Link to this thread/post. We can connect offline and discuss further on this.
Hope this helps. Do let us know if you any further queries.
Thanks,
Navya.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.