I have an existing OMS Log Analytics Workspace. The Workspace ID is a guid. This is the only thing I am able to use due to an existing project. Using this guid I need to get hold of the Workspace Name example "myWorkspace" in the arm template. I am allowed to pass the guid as the parameter to the arm template. The Guid actually is a customerId property if I look in the Json and ResourceId maps to the Workspace Name which begins with /subscription/xx-xxx-xxx-xxx/......../myWorkspace.
I need to get hold of this Workspace Name (ResourceId) from guid (customerId). Please let me know if I can do this or not? Really struggling to get this working...
You can get it from ARG (Azure resource graph) pretty easily, but there's no way i know of to look it up IN an ARM template itself. you'd probably have to look up the id outside the template and pass it in as a parameter?
https://learn.microsoft.com/en-us/azure/governance/resource-graph/concepts/explore-resources