| title | Quickstart | ||
|---|---|---|---|
| description | Get started with LocalStack for Azure in a few simple steps. | ||
| template | doc | ||
| sidebar |
|
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:
{
"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.