Skip to content
Get Started for Free

Quickstart

This guide explains how to set up the Azure emulator and interact with it using the az CLI. In this guide, you will run some basic Azure CLI commands to manage resource groups in an local Azure development environment without connecting to the real cloud services.

Before you begin, make sure that the Emulator is running, see the installation instructions.

To instruct the regular az CLI tool to communicate with the Azure emulator, run the following command:

$ azlocal start_interception

You may see some warnings about experimental commands, you can safely ignore these.

To create a resource group, you can now the same az command as you would normally:

$ az group create --name MyResourceGroup --location westeurope

The following output would be displayed:

Terminal window
{
"id": "/subscriptions/some-generated-id/resourceGroups/MyResourceGroup",
"location": "westeurope",
"managedBy": null,
"name": "MyResourceGroup",
"properties": {
"provisioningState": "Succeeded"
},
"tags": null,
"type": "Microsoft.Resources/resourceGroups"
}

To check the resource group details, run the following command:

$ az group show --name MyResourceGroup

To list all the resource groups, run the following command:

$ azlocal group list

To delete the resource group, run the following command:

$ az group delete --name MyResourceGroup --yes

When you’re done using the Azure Emulator, you can run the following command:

$ azlocal stop_interception

All invocations of the az CLI tool will now talk to the real Azure Cloud again.

Was this page helpful?