Im trying to deploy a ServiceBus through an ARM template. I ive tried all these versions as the serviceBusNamespaceName value with the same error message:
Not working (using resource group named: 'INT001-TestOrderStore-Cert' ) :
- "[concat('INT1001-ServiceBus-', uniqueString(resourceGroup().id))]"
- "[concat('INT1001-ServiceBus', uniqueString(resourceGroup().id))]"
- "[concat('INT1001-MyOwnName', uniqueString(resourceGroup().id))]"
- "[concat('int1001-myownname', uniqueString(toLower(resourceGroup().id))]"
but always get the same error message:
2020-03-22T11:54:07.2612863Z ##[error]BadRequest: { "error": { "message": "The specified service namespace is invalid. CorrelationId: 43105e81-4248-41d6-ba91-9070e8ac4637", "code": "BadRequest" } }
This is the only one that has worked so far: "sbnslau-1fa155e2-b3fb-48b9-a204-af1d2a02f40c"
So i need to understand what is going wrong when i try to use concat and unique string. Is there anyway in the azure portal i can evaluate the expression to se what it resolves too?
This is what my ARM looks like:
sbArmDeploy.json
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"serviceBusNamespaceName": {
"type": "string",
"metadata": {
"description": "Name of the Service Bus namespace"
}
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "Location for all resources."
}
}
},
"variables": {},
"resources": [
{
"apiVersion": "2017-04-01",
"name": "[parameters('serviceBusNamespaceName')]",
"type": "Microsoft.ServiceBus/namespaces",
"location": "[parameters('location')]",
"sku": {
"name": "Standard",
"tier": "Standard"
}
}
],
"outputs": {}
}
SbArmDeploy-Parameters.json
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"serviceBusNamespaceName": {
"value": "sbns_1fa155e2-b3fb-48b9-a204-af1d2a02f40c"
}
}
}