Publish Azure Bot Framework Composer Bot to already existing Resource Group.

  • Thread starter Thread starter Sai_Teja_Nagamothu
  • Start date Start date
S

Sai_Teja_Nagamothu

Guest
Follow the same steps mentioned here Publish a bot to Azure - Bot Composer | Microsoft Docs However to publish Azure Bot Framework Composer Bot to already existing Resource Group, follow below steps.



You can find the provisioning steps in the readme.md file which is automatically created when you create a new Bot in Bot Composer.



large?v=1.png

As of now, by default, provisioning script creates a new Resource Group appending environment value to it and does not deploy the services to an existing Resource Group.



large?v=1.png

Find value



const resourceGroupName = ${name}-${environment};



and change it to



const resourceGroupName = ${name};



in the file provisionComposer.js and save. With this simple change, it will not append the given Environment value to Resource Group name.



Why this will work?

In provisionComposer.js file, the code



const createResourceGroup = async (client, location, resourceGroupName) => { logger({ status: BotProjectDeployLoggerType.PROVISION_INFO, message: "> Creating resource group ...", }); const param = { location: location, }; return await client.resourceGroups.createOrUpdate(resourceGroupName, param); };




uses function client.resourceGroups.createOrUpdate - this function just checks if the RG exists or not, it's present, it'll use the same RG, if not, it'll create a new RG and also if you provide a new location it'll update the location to existing RG.

Continue reading...
 
Back
Top