I have created a simple Azure Bot from a Typescript template from this tutorial. I have tested it in the Bot Framework Emulator and now want to deploy it to Azure. I am trying to follow the instructions here. I get as far as the step "Deploy via ARM template with existing resource group" (I have already created a Resource Group).
So I am trying to run this command from the command line:
az deployment group create --resource-group "<name-of-resource-group>" --template-file "<path-to-template-with-preexisting-rg.json>" --parameters appId="<app-id-from-previous-step>" appSecret="<password-from-previous-step>" botId="<id or bot-app-service-name>" newWebAppName="<bot-app-service-name>" existingAppServicePlan="<name-of-app-service-plan>" appServicePlanLocation="<region-location-name>" --name "<bot-app-service-name>"
I'm getting an error: az deployment: 'group' is not in the 'az deployment' command group. Sure enough when I look at the help for az deployment, there is no group command. There is a create command, but if I remove group I get into a series of other errors which just seem to lead me down a rabbit hole.
In my desperation, I tried installing the BotFrameworkComposer app (Linux) and to create a project from there. It gives me an error Error calling npm to fetch template. Please ensure that node and npm are installed and available on your system. Full error message: Command failed with ENOENT: npm root -g --prefix. So I tried opening the bot resource that I created in the Azure portal using the "Open in Composer" button and nothing opens. So I copied the link from the button into the browser (as it suggests) but the app doesn't open.
I'm getting an error: az deployment: 'group' is not in the 'az deployment' command group. Sure enough when I look at the help for az deployment, there is no group command.
What version is your AZ CLI?
I am using 2.27.2 and I have it.
C:\>az -v
azure-cli 2.27.2
core 2.27.2
telemetry 1.0.6
C:\>az deployment --help
Group
az deployment : Manage Azure Resource Manager template deployment at subscription scope.
Subgroups:
group : Manage Azure Resource Manager template deployment at resource group.
mg : Manage Azure Resource Manager template deployment at management group.
operation : Manage deployment operations at subscription scope.
sub : Manage Azure Resource Manager template deployment at subscription scope.
tenant : Manage Azure Resource Manager template deployment at tenant scope.
C:\>az deployment group --help
Group
az deployment group : Manage Azure Resource Manager template deployment at resource group.
Commands:
cancel : Cancel a deployment at resource group.
create : Start a deployment at resource group.
delete : Delete a deployment at resource group.
export : Export the template used for a deployment.
list : List deployments at resource group.
show : Show a deployment at resource group.
validate : Validate whether a template is valid at resource group.
wait : Place the CLI in a waiting state until a deployment condition is met.
what-if : Execute a deployment What-If operation at resource group scope.
Related
I'm following the instructions here to create an azure static web app from the cloud shell, using the command:
az webapp up --location westindia --name static-webapp-test --html
Getting the following Unauthorized error :
The webapp 'static-webapp-test' doesn't exist Creating Resource group 'anubhav.das_rg_8008' ... Resource group creation complete Creating AppServicePlan 'anubhav.das_asp_4721' ... Operation returned an invalid status 'Unauthorized'
I have seen these type of errors like preventing the user from creation of resources due to role restrictions or access level restrictions in the subscription.
Please check your role (should be owner or contributor or user access administrator) and filters added in the Azure Active Directory.
It is recommended to use the latest version of CLI.
If you are using the older version run the below cmdlet to upgrade the CLI to latest version :
az upgrade --yes
I have followed the steps provided in the given documentation, we are able to create the static web app successfully :
Selected Azure Cloud Shell and given the following settings like my subscription, location, resource group name, storage account name, file share name for working on the cloud shell.
Cloned the git hub project to my azure account as you can see in below screenshot:
Also created another same type of application with the name you have given:
As I can see there is no issue in creation of static html web app though I have existing resource group using for working with cloud shell, it is creating new resource group for the web app purpose by using the given commands in the documentation and working good without any access restriction like authorization as my role belongs to Contributor.
Recently I have started doing some Azure Data Factory deployments using the AzureRM_Template_Deployment resource in Terraform using Azure DevOps. I need to be able to browse all the deployments I made using this resource. When I open the Deployments folder in the Azure portal I do not see anything there. But I'm sure this deployment exists because if I use the same name for a future template deployment using Terraform, I get the below error:
resource with the ID "/subscriptions/***/resourceGroups/***/providers/Microsoft.Resources/deployments/<deploymentName>" already exists
Any help is appreciated.
I tried creating a storage account from the sample registry I found from azurerm_template_deployment Terraform Registry, after the deployment was successful, If I go to the deployment folder from portal I don’t find any . Its because we didn’t use the template on subscription level rather we used on resource group. We deploy the resources using the ARM template to the resource group that’s being created by terraform.
So, we can find the template deployment inside the resource group under the deployment blade as shown.
I created a bot with the Microsoft Enterprise Bot Template, and now I want to deploy it to Azure. I am following this guide, but I am getting the following error after the following command
Command :
msbot clone services --name "YOUR_BOT_NAME"
--luisAuthoringKey "YOUR_AUTHORING_KEY"
--folder "DeploymentScripts\LOCALE_FOLDER"
-- location "REGION"
Error:
Command failed: az group create -g MyBot -l "region" --subscription KEY
ERROR: The client 'abcd' with object id '679ebaf5-4345-408c-87ef-
9c3bd2795a94' does not have authorization to perform action
'Microsoft.Resources/subscriptions/resourcegroups/write' over scope
'/subscriptions/abcd/resourcegroups/MyBot'.
this means you lack permissions to perform this action, you need to grant your service principal\user permissions (contributor is the easiest way to solve this) to perform that operation. you can grant them on specific resource group or on the subscription.
https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-portal
you need to have contributor access on the resource group that you are creating the bot in.
also ensure that Microsoft.BotService is a registered service on the subscription.
Currently im trying to create dynamic environments via AzureDevops.
One of these steps to achieve this is to take a copy of our production databases and place them in a temp resource group (Production Subscription) and then move the sql server and associated databases to our non-production subscription. From here we then create the web apps and deploy code.
When i run this via Az Cli i am able to move the resources with the following
SQLSERVERID=$(az resource show -g $RSGNAMETEMP -n $SQLSERVERNAME --resource-type "Microsoft.Sql/servers" --query id --output tsv)
az resource move --destination-group $RSGNAME --ids $SQLSERVERID --destination-subscription-id $SANDBOXSUBSCRIPTIONID
However when i run this via AzureDevops i get the following error
ERROR: The client (...) with object id (...) has permission to perform action on scope however, it does not have permission to perform action (...) on the linked scope(s).
I believe this problem is happening when you configure the AZ Cli step in AzureDevops you select the Subscription from the drop down list. The account / service principal only has access rights to that specific subscription and not to multiple. Is it possible to configure a service principal (that can be used in AzureDevops) that can connect to multiple subscriptions?
Yes, just go to Azure portal, navigate to the desired subscription blade, go to Access Control, press + sigh at the top and add your principal as a contributor to the subscription.
to find service principal name use this:
Click Manage link in the Azure Subscription field in your VSTS job, it will navigate you to a new blade. Click Manage Service Principal there. It will take you to the application page in Azure AD. After that you can copy name under Managed application in local directory field and use that name to grant it Key Vault permissions.
I am not able to Create Azure Paas resource "VirtualMachineScaleSets" within DevTestLab, which i am trying by uploading ARM Template to DevtestLab repository through VSTS. It gives "Authorization failed for template resource of type 'Microsoft.Compute/VirtualMachineScaleSets' error
Overall goal is to create "Service fabric cluster" within DevTestLab
MSDN link : https://learn.microsoft.com/en-us/azure/devtest-lab/devtest-lab-create-environment-from-arm
Because DevTestLab is different with Azure resource module. For now, Azure does not support deploy VMSS to DevTestLab.
By the way, we can't use the same template to deploy resource in DevTestLab, there are different resource.
More information about DevTestLab template, please refer to this link.
We have a fix working its way through our safe deployment pipeline. The fix will be deployed soon to all regions.
As a work around you could give "VS Dev Test Lab" application "owner" permission at subscription level and "owner" permission to DevTestLab created.