Azure / azure-quickstart-templates

Azure Quickstart Templates
https://aka.ms/azqst
MIT License
13.85k stars 16.02k forks source link

The workspace name is not unique #5284

Open INGourav opened 5 years ago

INGourav commented 5 years ago

--------------------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](Template link 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.

followtushar commented 5 years ago

change the name in deployment window.

stephenmontgomery commented 5 years ago

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.

boschcrank commented 5 years ago

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).

superfliege commented 5 years ago

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" }

INGourav commented 5 years ago

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

superfliege commented 5 years ago

@unpredictablegourav Full template example: https://www.danielstechblog.io/deploy-update-management-solution-azure-resource-manager-template/

tj111 commented 5 years ago

We ran into the same issue following this tutorial: https://docs.microsoft.com/en-us/azure/terraform/terraform-create-k8s-cluster-with-tf-and-aks

bergmeister commented 5 years ago

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

joshschmitter commented 3 years ago

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