Reputation: 135
Hi I am working in Azure ARM template. I am trying to get app url and add some string at the end.
{
"name": "HealthCheck__SwaggerUrl",
"value": "[concat(resourceId('Microsoft.Web/sites', variables('appServiceNameApi'), '2018-02-01').defaultHostName), '/swagger/v1/swagger.json']"
}
I am trying to get app service url and append /swagger/v1/swagger.json. Above statement gives me error
Deployment template language expression evaluation failed: 'Unable to parse language expression 'concat(resourceId('Microsoft.Web/sites', variables('appServiceNameApi'), '2018-02-01').defaultHostName), '/swagger/v1/swagger.json'': expected token 'EndOfData' and actual 'Comma'.'.
I am not able to get the root cause of this issue. Can someone help me to identify the issue. Any help would be greatly appreciated. Thank you
Upvotes: 1
Views: 1253
Reputation: 2908
Update to use reference
.
{
"name": "HealthCheck__SwaggerUrl",
"value": "[concat(reference(resourceId('Microsoft.Web/sites', variables('appServiceNameApi')), '2018-02-01').defaultHostName, '/swagger/v1/swagger.json')]"
}
Upvotes: 2