poiuytrez
poiuytrez

Reputation: 22518

Azure bot deployment

I am trying to deploy an Azure bot. When I try to run:

az deployment sub create --template-file "deploymentTemplates/template-with-new-rg.json" --location francecentral --parameters appType="MultiTenant" appId="aa14566a-c201-4488-8e7c-be837b921c50" appSecret="guyguyg" botId="bottest" botSku=F0 bottestservice

I get:

unrecognized template parameter 'appType'. Allowed parameters: appId, appSecret, botId, botSku, groupLocation, groupName, newAppServicePlanLocation, newAppServicePlanName, newAppServicePlanSku, newWebAppName

I have Azure Cli 2.30.0 (installed via Brew in MacOS)

Upvotes: 1

Views: 366

Answers (2)

FireFlying
FireFlying

Reputation: 41

I ran into this problem today, and the fix was simple: I had accidentally CD'd into an older project folder instead of the current project folder, and that older project had been using the older version of the deploy templates.

Check that your deployment template file is using the current schema, which appears to be 2019-04-01 and not an older schema such as 2015-01-01, as those older versions don't contain the 'appType' parameter.

Upvotes: 0

AP01
AP01

Reputation: 850

The parameter appType may not be the problem itself. The commands appear to have changed recently, and that's a new one. However, your command has several other issues, and thus it's likely that the service is simply throwing an error where it first encounters a problem. Firstly, bottestservice is entered without a parameter declaration. The service has no idea what that means.

Futhermore, the command to create a bot with a new Resource Group (I assumed you want to do this because you entered the command that has --template-file "deploymentTemplates/template-with-new-rg.json) requires several more parameters such as newAppServicePlanName, newWebAppName, groupName, groupLocation, newAppServicePlanLocation, and name. The last valid parameter you supplied was botSku. With several important parameters missing, it's possible that this is the source of your issue.

Please review the documentation you posted again and ensure you are entering the commands exactly and supplying all the required parameters. I got all of this from there.

Upvotes: 1

Related Questions