Recently, I wanted to create a Service Bus namespace via Bicep. The simplified resource looked like this:
resource serviceBus 'Microsoft.ServiceBus/namespaces@2021-06-01-preview' = { name: 'test-sb' location: resourceGroup().location sku: { name: 'Standard' tier: 'Standard' } }
When I deployed the resource, I got this exception: The specified service namespace is invalid. After 10 minutes troubleshooting, I decided to try to create a Service Bus namespace via the Azure portal. There, I detected that the problem was related to the name that I’ve chosen.
In some obsolete documentation, I discovered that your Service Bus namespace name must not end with “-sb” or “-mgmt”. Don’t ask me why 🙂
Hope this saves you some time!
Toon