Questions tagged [azure-cli]

The Azure CLI allows Azure users to manage their Azure assets and interact with their Azure services, applications, containers, and infrastructure in an idiomatic way.

Learn more here!

2057 questions
7
votes
3 answers

Terraform: Error building ARM Config - Authenticating using the Azure CLI is only supported

As the terraform azurerm provider misses support for azure webapp access restrictions (see github issue). We use a null_resource with local-exec to apply a access restriction: provisioner "local-exec" { command = <
quadroid
  • 8,444
  • 6
  • 49
  • 82
7
votes
5 answers

terraform azurerm : Error waiting for the Azure CLI: exit status 1

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:…
Karol Deland
  • 331
  • 1
  • 2
  • 8
7
votes
4 answers

az ad app permission add - Insufficient privileges to complete the operation

I'm getting ERROR: Insufficient privileges to complete the operation. when running az ad app permission add What permission do I need to grant my service principal for this to work? I gave it the AppRoleAssignment.ReadWrite.All permission which…
Joe Eng
  • 1,072
  • 2
  • 15
  • 30
7
votes
1 answer

Azure CLI: storage blob delete-batch to delete all blobs excluding two directories

I have a PowerShell script that currently deletes all blobs in my $web container. az storage blob delete-batch --account-name myaccountname --source $web This works great, but now I want to exclude two directories from being deleted. I've looked…
Tom Faltesek
  • 2,768
  • 1
  • 19
  • 30
7
votes
4 answers

How to use filter with az ad app to do a bulk delete

I'm trying to delete a lot of apps that carry a similar property with AZ AD CLI. I can't find any good examples on --filter Attempting to do something like this: ad az app list --filter (displayName like 'stack') | ad az app delete Any pointers…
Derek
  • 313
  • 4
  • 11
7
votes
2 answers

What's the equivalent terraform code for Azure AD SP create-for-rbac?

For an integration, a service defines the following command to run az ad sp create-for-rbac --role reader --scopes /subscriptions/{subscription_id} Instead of running the command, I was wondering what the equivalent terraform code for az ad sp…
StephenG
  • 2,851
  • 1
  • 16
  • 36
7
votes
2 answers

How can I grant roleAssignement/write permission to azure devops service connection

I am setting a staging environment for my Continuous Deployment. I am using the Azure devops service for repositories and pipelines. I need to add Azure Active Directory login to my Linux VMs. So far I followed this guide. It works on my machine,…
Vas Sim
  • 95
  • 1
  • 1
  • 7
7
votes
2 answers

Not able to purge Azure CDN Endpoint using Azure CLI

I'm using Azure CLI to purge all the contents from Azure CDN endpoint. I got a reference from Microsoft Docs: https://learn.microsoft.com/en-us/cli/azure/cdn/endpoint?view=azure-cli-latest I'm trying exactly same commands with proper params but it…
Sunny Sharma
  • 4,688
  • 5
  • 35
  • 73
7
votes
4 answers

Space separated values; how to provide a value containing a space

I'm creating a bash script to provision multiple Azure resources via the Azure CLI. So far so good, however I'm having a problem tagging resources. My goal is to store multiple tags in a variable and provide that variable to the --tags option of…
Arjen
  • 73
  • 2
  • 7
7
votes
2 answers

Does the Azure CLI use the Azure Rest API

Does the Azure CLI SDK use the Azure Rest API internally? And if so any further details on how these relate to each other internally would be great.
Steven Mark Ford
  • 3,372
  • 21
  • 32
7
votes
1 answer

Enable Azure diagnostics logging using a CLI

I am trying to achieve achieve this, however I would like to enable diagnostics logging using whatever form of non-human interaction possible. I would like to incorporate something that enables diagnostics logging during my build step, by default…
Lutando
  • 4,909
  • 23
  • 42
7
votes
2 answers

How to auto-generate deploy.cmd in new Azure CLI?

I'm following this guide to create a web app with a custom deploy.cmd file. The article suggests that I can get a copy of the current deploy.cmd file (which I'll then modify) using the following command: azure site deploymentscript…
mewahl
  • 795
  • 6
  • 20
6
votes
1 answer

Azure Container Registry (ACR) Run vs Azure Container Instance (ACI) Create

While studying for the AZ-204 certification, I found myself in a question related to two commands. Azure Container Registry (ACR) Run the sample/hello-world:v1 container image from your container registry by using the az acr run command az acr run…
6
votes
2 answers

How to run Azure CLI tasks from an Azure DevOps Pipeline on a Self-Hosted Windows Agent?

Situation My self-hosted Windows Agent runs a pipeline from Azure DevOps. To manage resources in Azure I want to use an Azure CLI task. The AzureCLI task fails, even though Azure CLI is installed in a prior step. I have two scripts that run from my…
Falco
  • 101
  • 1
  • 1
  • 8
6
votes
3 answers

How to create an azure repository directly from git bash command line? (without entering the browser)

Update I am trying to create a repository from git bash command line to AzureDevops team platform, I've been following these instructions: https://learn.microsoft.com/en-us/azure/devops/repos/git/share-your-code-in-git-cmdline?view=azure-devops I am…
AlSub
  • 1,384
  • 1
  • 14
  • 33