Unable to deploy bot via ARM template

Anton Eliseev 96 Reputation points
2020-09-27T17:25:12.057+00:00

I followed step-by-step this article https://video2.skills-academy.com/en-us/azure/bot-service/bot-builder-tutorial-basic-deploy?view=azure-bot-service-4.0&tabs=csharp%2Cvs

I created test Echo Bot just using C# VS template for .Net Core 3, changed nothing and decided to test deployment to Azure.
Everything worked fine until I tried to perform this step https://video2.skills-academy.com/en-us/azure/bot-service/bot-builder-tutorial-basic-deploy?view=azure-bot-service-4.0&tabs=csharp%2Cvs#deploy-via-arm-template-with-new-resource-group

It failed with error Deployment template validation failed: 'The resource 'Microsoft.Web/serverfarms/TestEchoBotPlan' is not defined in the template.

The issue seems to be known: https://stackoverflow.com/questions/63332059/deployment-template-validation-failed-the-resource-microsoft-web-serverfarms

So I decided to do as it suggested and created new resource group manually.
After that I tried to perform this step https://video2.skills-academy.com/en-us/azure/bot-service/bot-builder-tutorial-basic-deploy?view=azure-bot-service-4.0&tabs=csharp%2Cvs#deploy-via-arm-template-with-existing-resource-group

It failed with message Bot is not valid. Errors: The bot name is already registered to another bot application..

The issue also seems to be known: https://github.com/MicrosoftDocs/bot-docs/issues/1324
But in that case problem was apparently related to same names in the parameters botId, newWebAppName and display-name and fixed by changing them. In my case all these values are already different but issue is the same. Deployment fails in every combination.

Examining the deployment itself I see that fail occurs on the last step, when first ones are fine and web site is perfectly working

28564-capture2.png

Wasted half a day in attempts to fix it I decided to perform last steps from the initial article and it succeeded. Deployment preparation passed and zip-file was uploaded.
Though, step 5 from here couldn't be reproduced since there is no such option https://video2.skills-academy.com/en-us/azure/bot-service/bot-builder-tutorial-basic-deploy?view=azure-bot-service-4.0&tabs=csharp%2Cvs#test-in-web-chat

So now I don't know what was wrong and how to fix it. I just can't deploy my bot normally and don't know how to test it. Azure support was also unable to help and addressed me to this forum.
Any ideas?

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
833 questions
{count} votes

Accepted answer
  1. Anton Eliseev 96 Reputation points
    2020-10-01T18:37:36.18+00:00

    As a result:

    1. First problem with new resource group template is about to be fixed (or fixed already in new sample versions)
    2. Second problem with existing resource group deployment solves by setting globally unique botId across all Azure (Thanks anonymous userD-3625 for clarification)
    3. There is alternative way for creating and deploying bot without ARM: Go to Azure Portal -> Add new resource -> Select "Web App Bot" -> Fill in all necessary data and create bot resources -> Click Publish on one of created resources (of type App Service if I remember correctly) -> Download .PublishSettings -> In VS bot project click Publish -> Select "Import from.. " option -> Choose you publish settings file -> Publish bot
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.