az cli deployment fails with Python error - azure

I am deploying ADF linked templates from ADLS through GitHub Actions and pipeline fails withy generic Python error:
ERROR: 'str' object has no attribute 'get'
INFO: Command ran in 1.201 seconds (init: 0.389, invoke: 0.812)
Error: Process completed with exit code 1.
Deployment command is:
az deployment group create
--resource-group $ADF_RESOURCE_GROUP
--name $ADF_DEPLOYMENT_NAME
--what-if
--what-if-result-format ResourceIdOnly
--template-uri $TEMPLATE_URI
--query-string $SAS_TOKEN
--parameters factoryName=$FACTORY_NAME
What-if part is only for debugging purposes.
Here is official documentation

Related

"az connectedk8s connect" has error "Problem loading the kubeconfig file.module 'collections' has no attribute 'Hashable'"

I am trying to connect my non aks k8s cluster to azure arc. I want to attempt to do this entirely through the cli. Looking at the quickstart-connect-cluster guide it skips right from resource group creation to the az connectedk8s connect step.
When attempting to connect to my cluster currently I get the following error:
$ az connectedk8s connect --name $STACK_NAME --resource-group $STACK_NAME --location eastus --tags Datacenter=miami-lab City=Miami StateOrDistrict=Florada CountryOrRegion=USA
This operation might take a while...
Problem loading the kubeconfig file.module 'collections' has no attribute 'Hashable'
I believe I may need to run some other az command to create any resources I may be missing under https://portal.azure.com/#view/Microsoft_Azure_HybridCompute/AzureArcCenterBlade/~/allresources
Am I missing some other resources I need to create before running the above command? If so, what is the az command needed to create these missing resrouces?

Resize vmss in azure using azure cli

I want to update size of vmss from Standard_F16s_v2 to Standard_F32s_v2 I usually do it from Ui
but for some requirement I have to do it from a script so I tried to follow the documentation
https://learn.microsoft.com/en-us/cli/azure/vmss?view=azure-cli-latest
and tried to run this command
az vmss update --name MyScaleSet --resource-group MyResourceGroup --vm-sku Standard_F32s_v2
but it is not working shows error UnrecognizedArgumentError: unrecognized arguments: --vm-sku Standard_F32s_v2
The issue was with a previous version of az CLI which was resolved by upgrading it to version 2.30.0.
Test Scenario :

ERROR: 400 Client Error: Bad Request for url Azure Powershell

I'm facing an issue while run the given below command on azure powershelll to create an alert ,it was working as anticipated day before yesterday.
though surprised it has stopped working
ERROR
ERROR: 400 Client Error: Bad Request for url:
https://management.azure.com/subscriptions/09251b4d-e2aa-4e1d-a447-2abef1a761ec/resourcegroups/vmrg/providers/Microsoft.Resources/deployments/my-dep?api-version=2018-05-01
i use the following command on powershell
az group deployment create --name my-dep -g vmrg --template-file C:\HM\ARM\VMAlertArm\xyz.json --parameters C:\HM\ARM\VMAlertArm\xyz.parameters.json
What am i missing???
Thanks
Try appending "--debug" param at the end of your cli command to enable debug log so that you can see the detailed error message. For instance :
az group show --name 'abc' --debug
And we can find underlying http request log and detailed error messages :
Hope it helps .

I get this error in windows CMD "stat: path too long for Windows" -- Azure cli

I get this error in windows CMD "stat: path too long for Windows" whenever I execute this command below in my azure cli in windows CMD.
az group deployment create -g "testacsengine" --template-file azuredeploy.json --parameters #azuredeploy.parameters.json
In windows, if you already install the Azure CLI model, you can execute the CLI command in CMD or Windows PowerShell ISE.
For the deployment of Azure template, you can just use the command az group deployment create -g "charlesTest" --template-file template.json in the directory of your template.
Or use the absolute path like this az group deployment create -g "charlesTest" --template-file D:\template.json. Of curse, you need to get authentication with the command az login first.
If you still get the error when you do this, the error must be inside your template. You should check your template correctly.
For more details about template deployment, see az group deployment create.

Azure ml workbench demo app keep failing during setup

I installed Azure ML workbench and attempted to create an env with
az ml env setup -c -n -g --location
but keep getting failure
"code": "Conflict",
"message": "SubDeployment: OperationId=08586736946377270318, ProvisioningState=Failed, StatusCode=Conflict, StatusMessage=Template output evaluation skipped: at least one resource deployment operation failed. Please list deployment operations for details.
How can I look into what this error is exactly, and how to get around it?

Resources