I am trying azure group command using cli. its giving me error:
error: Deployment provisioning state was not successful
Below is the command i am using:
azure group deployment create -g "Default" --template-uri https://raw.githubusercontent.com/reshmai/azure/master/testmitheshgithubdb.json
For more info : When i tried with different uri with not given serverName. Its successfully created, but with serverName its not getting created, error is throwing.
Related
I am deploying a static react web app into azure static website (blob storage) using the command
While doing so I am doing it through Azure CLI (Inline command).
az storage blob upload-batch -s ./ -d '$web' \
--account-name <storage_acct_name> \
--account-key <storage_acct_key>
This command gives me an error
2022-11-17T08:27:29.5243851Z ERROR: Failed to connect to MSI. Please make sure MSI is configured correctly.
2022-11-17T08:27:29.5244667Z Get Token request returned http error: 400, reason: Bad Request
2022-11-17T08:27:29.5274714Z ##[error]Error Code: [1]
2022-11-17T08:27:29.5283948Z ##[error]Error: Azure login failed using Managed Service Identity
2022-11-17T08:27:29.5285668Z ##[error]Script failed with error: ERROR: Failed to connect to MSI. Please make sure MSI is configured correctly.
What could be possible solution to get over this issue.
I tried in my environment and successfully deployed static web app in $Web.
Before running the command make sure you have logged in with current credentials:
az login --tenant xxxx-xxxxxxxxxxxxxx-xxxxx”
Command:
az storage blob upload-batch -d '$web' -s < path > --account-name <account name > --account-key "<account key>
Console:
Portal:
Reference:
azure - Configuration of Managed Service Identity(MSI) - Stack Overflow for pipeline problems.
Getting token from Cloud Shell intermittently fails with 400 Client Error: Bad Request · Issue #11749 · Azure/azure-cli · GitHub
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
When trying to run terraform locally with azurerm provider on my machine, I receive this error :
Error: Error building account: Error getting authenticated object ID: Error parsing json result from the Azure CLI: Error waiting for the Azure CLI: exit status 1
I followed this link :
https://github.com/terraform-providers/terraform-provider-azurerm/issues/3686#issuecomment-523983734
but the az account get-access-token works.
Any ideas?
Since my organization is using a self-signed certificate to control internet traffic, the az cli is not working as usual. To diagnose, you should run this command :
az ad signed-in-user show
It will show you a very clear message to workaround this issue.
https://github.com/Azure/azure-cli/blob/dev/doc/use_cli_effectively.md#working-behind-a-proxy
I exported the CA certificate from any website from Chrome in Base64 and copied the string in the pem file as indicated in the previous link. It worked!
On Windows :
Append the certificate in C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\Lib\site-packages\certifi\cacert.pem
Hope this helps someone!
Run az login again, it's worked for me!
I had this but the az ad signed-in-user show worked and the Azure CLI was up-to-date.
Terraform uses the command-line under-the-hood, but my terminal had additional lines injected in at the start (versioning, aliases/doskey), which is the bit that terraform was complaining about, rather than the Azure CLI. So I turned that off and it started working.
I had this issue as well. After looking through the link you provided, and trying various commands, including az logout and az login, it still was not working. az ad signed-in-user show did not show any errors or non-json output and my token was not expired, however when I ran az extension --help, I noticed a message that there was an update available for the azure cli.
So, what ended up working for me was to update the azure cli from 2.41.0 to 2.42.0. I did this via Homebrew, rather than the command given by the cli itself. Once I did that and then ran az login again, my terraform plan command worked without issues.
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" 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.