sjkp / ARM.NotificationHub

Example template for provisioning Azure Notification Hub with Azure Resource Manager Templates
0 stars 3 forks source link

Nested notification hub resource has an incorrect dependsOn value #1

Closed pedrams1 closed 8 years ago

pedrams1 commented 8 years ago

The nested notificationhub resource shouldn't fully qualify the path of the namespace resource it's depending on, as it's nested. When you deploy the template the way it is as the moment, you get "Forbidden" errors during the deployment and eventually a resource not found error when it ultimately fails.

      "dependsOn": [
        "[variables('NotificationHubNamespace')]"
      ]

Tried to pull request this in but didn't have permissions so raising an issue instead.

sjkp commented 8 years ago

interresting - since the template have worked in the past. But I updated it anyway.

pedrams1 commented 8 years ago

@sjkp It actually wasn't root cause, sorry I was a bit quick to jump to this conclusion! (though removing the full path is a bit cleaner anyway so your update isn't in vane :)!)

The issue is if you deploy your NotificationHub Namespace alongside a Service Bus Namespace in the same ARM template. The NotificationHub under the hood appears to be another Service Bus (i.e. the url is .servicebus.windows.net), but the naming conflict doesn't get detected and you end up with a very broken NotificationHub namespace.

Took me a whole day to figure that out - will push it downstream to MS

sjkp commented 8 years ago

@pedrams1 they are doing a major refactoring of the service bus services, to split them into seperate ARM types, because as you noticed it gets pretty confusing the service bus notification hub is a seperate service bus namespace from queues, topics, event hub and relay agent, that can all be together. I think they are going to split it into 5 different types of azure resources - which will allow them to scale better, and make it easier to reason about https://azure.microsoft.com/en-us/blog/service-bus-and-the-new-azure-portal/

pedrams1 commented 8 years ago

@sjkp Wish I had spoken to you 6 hours ago - ha! Yeah it seems you're bang on and I agree it's a really good change on their end. It was quite confusing before - independent namespaces are much cleaner. Just got to forgive/work through the preview bugs for the time being :)