Home > Blockchain >  The specified name is not available Azure EventHub namespace
The specified name is not available Azure EventHub namespace

Time:07-22

I have tried to deploy an ARM template with new EventHub Namespace. But it is failing with the BadRequest error, The specified name isn't available.. But the name has not used previously in anything under that resource group. When I tried to create a similar resource manually from the portal it is working fine. So it should not be a privileges' issue. Can anyone suggest my issue here please?

{
    "type": "Microsoft.EventHub/namespaces",
    "apiVersion": "2021-11-01",
    "name": "xxxx-xxxx-xxx-000",
    "location": "[variables('location')]",
    "sku": {
        "name": "Standard",
        "tier": "Standard",
        "capacity": 1
    },
    "properties": {
        "isAutoInflateEnabled": false,
        "maximumThroughputUnits": 0
    }
}

CodePudding user response:

We have tried the same in our environment to create an eventhub namespace with name similar to yours and it works fine .

Below is the workaround we followed;

In the same name that we will be trying to deploy through ARM created in portal and then trying to deploy through ARM and got the same issue.

enter image description here

Yes its a known issue we can expect , To ensure that we need to provide the name which is globally unique and not by any resource group ,Not only at your resource group ,this name should not use anywhere(Azure) .

Make sure that if you have created it through portal and trying with ARM again , please delete the previous one if you are owner of that namespace. And try again with same name after deletion.

We have provided the namespace just similar to you to check whether this value is passed or not and it works successfully.

template.json

"resources": [
{
"type": "Microsoft.EventHub/namespaces",
"apiVersion": "2022-01-01-preview",
"name": "[parameters('namespaces_ajletter_test_111_something_name')]",
"location": "Central India",
"sku": {
"name": "Standard",
"tier": "Standard",
"capacity": 1
},

OUTPUT SCREENSHOT FOR REFERENCE:-

enter image description here enter image description here

For more information please refer the below links:-

  • Related