Azure-quickstart-templates: The workspace name is not unique

Created on 8 Oct 2018  路  9Comments  路  Source: Azure/azure-quickstart-templates

--------------------MESSAGE FROM ADMIN, DELETE BEFORE SUBMITTING----------------------

Sorry to hear you had a bad experience with one of the templates :worried: But, in case you're just asking a question, we're happy to help. You can also check if the question might already have been asked here https://github.com/Azure/azure-quickstart-templates/issues?utf8=%E2%9C%93&q=is%3Aissue

We've created an outline of recommended sections to fill out that will help make this Pull Request awesome!

--------------------MESSAGE FROM ADMIN, DELETE BEFORE SUBMITTING----------------------

Template Name goes here

Issue Details

{
"error": {
"code": "Conflict",
"message": "The workspace name 'xxxxxx-oms' is not unique",
"target": "name"
}
}

Repro steps (if necessary, delete otherwise)

1.
2.
3.
4.
5.

Most helpful comment

Hi,
Any update on this? I have run into this several times on 2 different resource groups. Using [concat(variables('namespace'), '-Workspace-', uniqueString(resourceGroup().id))] to create unique workspace names. Appears to me that when the resource group gets torn down, Azure sometimes leaves OMS workspace dangling...
Deleting the resource group doesn't sort it either - have to use another RG completely or change the naming of workspace.

All 9 comments

change the name in deployment window.

Hi,
Any update on this? I have run into this several times on 2 different resource groups. Using [concat(variables('namespace'), '-Workspace-', uniqueString(resourceGroup().id))] to create unique workspace names. Appears to me that when the resource group gets torn down, Azure sometimes leaves OMS workspace dangling...
Deleting the resource group doesn't sort it either - have to use another RG completely or change the naming of workspace.

Same here. Since naming is important to use, we cannot always resort to use new names for given LA workspaces (especially when creating all the Azure resources via Terraform/devops pipeline).

I would like to create a specific resource and link it to an OMS.

Unfortunately I get the following error message.

However, the resource is unique.

If I take an empty resource group for my template and execute the template, everything will be recreated.

I can not explain that unfortunately.

My template:
Pastebin

Resource Microsoft.OperationalInsights/workspaces 'LogAnalyticsUpdates' failed with message '{ "error": { "code": "Conflict", "message": "The workspace name 'MyWorkspaceName' is not unique", "target": "name" }

@superfliege Could you please the entire template here, If possible for you.

The problem seems to be that the namespace name has to be unique across the whole of Azure, not just the subscription/tenant:
https://github.com/MicrosoftDocs/azure-docs/issues/35143#issuecomment-514179683

Note that deleted workspaces move to a 14 day soft-delete period, which may contribute to this error message. This page shows how to recover or permanently delete soft-deleted workspaces.
https://docs.microsoft.com/en-us/azure/azure-monitor/platform/delete-workspace

Was this page helpful?
0 / 5 - 0 ratings