Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 8 additions & 33 deletions src/content/docs/azure/integrations/az.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,58 +16,33 @@ This guide will show you how to use it to interact with LocalStack.
This guide is designed for users who are new to LocalStack for Azure emulator and assumes basic knowledge of how the Azure CLI works.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to my comments on the Quick Start, we recommend start/stop-interception first, and use the other mode as alternative.

We will demonstrate how to create, show and delete an Azure resource group.

### Install the packages
### Prerequisites

Run the following command to install the required packages:
This guide uses [`lstk`](/aws/developer-tools/running-localstack/lstk/), which proxies your host `az` CLI against the Azure emulator using an isolated configuration directory, so your global `~/.azure` setup is left untouched.

```
$ pip install azlocal
```

You now have access to the following LocalStack tools:

| CLI tool | LocalStack tool | Purpose |
|-----------|-----------------|-------------------------------|
| az | azlocal | Interact with Azure resources |
| azd | azdlocal | Deploy ARM/Bicep templates |

The LocalStack variants are wrappers around the existing tools, so you keep the full functionality of the original tool. It will just redirect all commands to the running LocalStack Emulator.

### Setup the az CLI

To make sure the `az` tool sends requests to the Azure Emulator REST API, run the following command:
Run the following command once to prepare the integration:

```
$ azlocal start_interception
$ lstk setup azure
```

### Create and manage the Resource Group

Run the following command to create a resource group in the Emulator:
Run the following command to create a resource group in the Emulator, prefixing the same `az` command you would normally run with `lstk az`:

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

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

```
$ az group show --name MyResourceGroup
$ lstk az group show --name MyResourceGroup
```

To delete the resource group, run the following command:

```
$ az group delete --name MyResourceGroup --yes
$ lstk az group delete --name MyResourceGroup --yes
```

### Teardown

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

```
$ azlocal stop_interception
```

The `az` CLI tool will now communicate with the Azure REST API on future invocations.

5 changes: 5 additions & 0 deletions src/content/docs/azure/integrations/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ The `azlocal` package is provided by LocalStack to simplify the process of inter

The other two packages are packages provided by Azure to interact with Azure services in Python.

:::note
Elsewhere in these docs, `az` CLI examples use [`lstk az`](/aws/developer-tools/running-localstack/lstk/) instead of `azlocal`.
`lstk` proxies the `az` CLI, but does not provide a Python SDK interception helper — for Python, `azlocal`'s `PythonLocalSdk` (used below) remains the supported approach.
:::

### Create a Python file

You can now use the Azure SDK for Python to interact with LocalStack.
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/azure/services/action-group.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ This guide walks you through creating an Action Group with an email receiver and
Launch LocalStack using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). Once the container is running, enable Azure CLI interception by running:

```bash
azlocal start-interception
lstk az start-interception
```

This command points the `az` CLI away from the public Azure management REST API and toward the LocalStack for Azure emulator API.
To revert this configuration, run:

```bash
azlocal stop-interception
lstk az stop-interception
```

This reconfigures the `az` CLI to send commands to the official Azure management REST API.
Expand Down
6 changes: 3 additions & 3 deletions src/content/docs/azure/services/api-management.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ The supported APIs are available on our [API Coverage section](#api-coverage), w

## Getting started

This guide walks you through creating an API Management service, adding an API, and defining and updating an operation. It is designed for users new to API Management and assumes basic knowledge of the Azure CLI and our `azlocal` wrapper script.
This guide walks you through creating an API Management service, adding an API, and defining and updating an operation. It is designed for users new to API Management and assumes basic knowledge of the Azure CLI and our `lstk az` proxy.

Launch LocalStack using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). Once the container is running, enable Azure CLI interception by running:

```bash
azlocal start-interception
lstk az start-interception
```

This command points the `az` CLI away from the public Azure management REST API and toward the LocalStack for Azure emulator API.
To revert this configuration, run:

```bash
azlocal stop-interception
lstk az stop-interception
```

This reconfigures the `az` CLI to send commands to the official Azure management REST API.
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/azure/services/application-insights.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ The Azure CLI commands below use the [`application-insights` extension](https://
Launch LocalStack using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). Once the container is running, enable Azure CLI interception by running:

```bash
azlocal start-interception
lstk az start-interception
```

This command points the `az` CLI away from the public Azure management REST API and toward the LocalStack for Azure emulator API.
To revert this configuration, run:

```bash
azlocal stop-interception
lstk az stop-interception
```

This reconfigures the `az` CLI to send commands to the official Azure management REST API.
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/azure/services/autoscale-setting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ This guide walks you through creating an autoscale setting targeting an App Serv
Launch LocalStack using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). Once the container is running, enable Azure CLI interception by running:

```bash
azlocal start-interception
lstk az start-interception
```

This command points the `az` CLI away from the public Azure management REST API and toward the LocalStack for Azure emulator API.
To revert this configuration, run:

```bash
azlocal stop-interception
lstk az stop-interception
```

This reconfigures the `az` CLI to send commands to the official Azure management REST API.
Expand Down
6 changes: 3 additions & 3 deletions src/content/docs/azure/services/bastion-host.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ The supported APIs are available on our [API Coverage section](#api-coverage), w

## Getting started

This guide is designed for users new to Bastion Host and assumes basic knowledge of the Azure CLI and our `azlocal` wrapper script.
This guide is designed for users new to Bastion Host and assumes basic knowledge of the Azure CLI and our `lstk az` proxy.

Launch LocalStack using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). Once the container is running, enable Azure CLI interception by running:

```bash
azlocal start-interception
lstk az start-interception
```

This command points the `az` CLI away from the public Azure management REST API and toward the LocalStack for Azure emulator API.
To revert this configuration, run:

```bash
azlocal stop-interception
lstk az stop-interception
```

This reconfigures the `az` CLI to send commands to the official Azure management REST API.
Expand Down
10 changes: 5 additions & 5 deletions src/content/docs/azure/services/blob-storage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ The supported APIs are available on our [API Coverage section](#api-coverage), w

## Getting started

This guide is designed for users new to Blob Storage and assumes basic knowledge of the Azure CLI and our `azlocal` wrapper script.
This guide is designed for users new to Blob Storage and assumes basic knowledge of the Azure CLI and our `lstk az` proxy.

Launch LocalStack using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). Once the container is running, enable Azure CLI interception by running:

```bash
azlocal start-interception
lstk az start-interception
```

:::note

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this note can be removed now. It served some historical clarification but is now actually more confusing.

As an alternative to using the `azlocal` CLI, users can run:
As an alternative to using the `lstk az` proxy, users can run:

`azlocal start-interception`
`lstk az start-interception`

This command points the `az` CLI away from the public Azure management REST API and toward the LocalStack for Azure emulator REST API.
To revert this configuration, run:

`azlocal stop-interception`
`lstk az stop-interception`

This reconfigures the `az` CLI to send commands to the official Azure management REST API
:::
Expand Down
6 changes: 3 additions & 3 deletions src/content/docs/azure/services/container-instance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ The supported APIs are available on our [API Coverage section](#api-coverage), w

## Getting started

This guide is designed for users new to Container Instances and assumes basic knowledge of the Azure CLI and our `azlocal` wrapper script.
This guide is designed for users new to Container Instances and assumes basic knowledge of the Azure CLI and our `lstk az` proxy.

Launch LocalStack using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). Once the container is running, enable Azure CLI interception by running:

```bash
azlocal start-interception
lstk az start-interception
```

This command points the `az` CLI away from the public Azure management REST API and toward the LocalStack for Azure emulator API.
To revert this configuration, run:

```bash
azlocal stop-interception
lstk az stop-interception
```

This reconfigures the `az` CLI to send commands to the official Azure management REST API.
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/azure/services/container-registry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ This guide walks you through creating a registry, logging in with Docker, pushin
Launch LocalStack using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). Once the container is running, enable Azure CLI interception by running:

```bash
azlocal start-interception
lstk az start-interception
```

This command points the `az` CLI away from the public Azure management REST API and toward the LocalStack for Azure emulator API.
To revert this configuration, run:

```bash
azlocal stop-interception
lstk az stop-interception
```

This reconfigures the `az` CLI to send commands to the official Azure management REST API.
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/azure/services/cosmos-db.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ This guide walks you through creating Cosmos DB accounts, databases, and contain
Launch LocalStack using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). Once the container is running, enable Azure CLI interception by running:

```bash
azlocal start-interception
lstk az start-interception
```

This command points the `az` CLI away from the public Azure management REST API and toward the LocalStack for Azure emulator API.
To revert this configuration, run:

```bash
azlocal stop-interception
lstk az stop-interception
```

This reconfigures the `az` CLI to send commands to the official Azure management REST API.
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/azure/services/data-collection-rules.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ This guide walks you through creating a Data Collection Endpoint, a Data Collect
Launch LocalStack using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). Once the container is running, enable Azure CLI interception by running:

```bash
azlocal start-interception
lstk az start-interception
```

This command points the `az` CLI away from the public Azure management REST API and toward the LocalStack for Azure emulator API.
To revert this configuration, run:

```bash
azlocal stop-interception
lstk az stop-interception
```

This reconfigures the `az` CLI to send commands to the official Azure management REST API.
Expand Down
6 changes: 3 additions & 3 deletions src/content/docs/azure/services/dbfor-postgresql.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ The supported APIs are available on our [API Coverage section](#api-coverage), w

## Getting started

This guide is designed for users new to Azure DB for PostgreSQL and assumes basic knowledge of the Azure CLI and our `azlocal` wrapper script.
This guide is designed for users new to Azure DB for PostgreSQL and assumes basic knowledge of the Azure CLI and our `lstk az` proxy.

Launch LocalStack using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). Once the container is running, enable Azure CLI interception by running:

```bash
azlocal start-interception
lstk az start-interception
```

This command points the `az` CLI away from the public Azure management REST API and toward the LocalStack for Azure emulator API.
To revert this configuration, run:

```bash
azlocal stop-interception
lstk az stop-interception
```

This reconfigures the `az` CLI to send commands to the official Azure management REST API.
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/azure/services/diagnostic-setting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ See also the [Monitor](/azure/services/monitor) page for a broader overview of d
Launch LocalStack using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). Once the container is running, enable Azure CLI interception by running:

```bash
azlocal start-interception
lstk az start-interception
```

This command points the `az` CLI away from the public Azure management REST API and toward the LocalStack for Azure emulator API.
To revert this configuration, run:

```bash
azlocal stop-interception
lstk az stop-interception
```

This reconfigures the `az` CLI to send commands to the official Azure management REST API.
Expand Down
6 changes: 3 additions & 3 deletions src/content/docs/azure/services/front-door.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ The supported APIs are available on our [API Coverage section](#api-coverage), w

## Getting started

This guide is designed for users new to Azure Front Door and assumes basic knowledge of the Azure CLI and our `azlocal` wrapper script.
This guide is designed for users new to Azure Front Door and assumes basic knowledge of the Azure CLI and our `lstk az` proxy.

Launch LocalStack using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). Once the container is running, enable Azure CLI interception by running:

```bash
azlocal start-interception
lstk az start-interception
```

This command points the `az` CLI away from the public Azure management REST API and toward the LocalStack for Azure emulator API.
To revert this configuration, run:

```bash
azlocal stop-interception
lstk az stop-interception
```

This reconfigures the `az` CLI to send commands to the official Azure management REST API.
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/azure/services/functions-app.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ This guide walks you through creating a Function App backed by a Storage Account
Launch LocalStack using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). Once the container is running, enable Azure CLI interception by running:

```bash
azlocal start-interception
lstk az start-interception
```

This command points the `az` CLI away from the public Azure management REST API and toward the LocalStack for Azure emulator API.
To revert this configuration, run:

```bash
azlocal stop-interception
lstk az stop-interception
```

This reconfigures the `az` CLI to send commands to the official Azure management REST API.
Expand Down
6 changes: 3 additions & 3 deletions src/content/docs/azure/services/key-vault.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ The supported APIs are available on our [API Coverage section](#api-coverage), w

## Getting started

This guide is designed for users new to Key Vault and assumes basic knowledge of the Azure CLI and our `azlocal` wrapper script.
This guide is designed for users new to Key Vault and assumes basic knowledge of the Azure CLI and our `lstk az` proxy.

Launch LocalStack using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). Once the container is running, enable Azure CLI interception by running:

```bash
azlocal start-interception
lstk az start-interception
```

This command points the `az` CLI away from the public Azure management REST API and toward the LocalStack for Azure emulator API.
To revert this configuration, run:

```bash
azlocal stop-interception
lstk az stop-interception
```

This reconfigures the `az` CLI to send commands to the official Azure management REST API.
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/azure/services/log-analytics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ This guide walks you through creating a Log Analytics Workspace, retrieving its
Launch LocalStack using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). Once the container is running, enable Azure CLI interception by running:

```bash
azlocal start-interception
lstk az start-interception
```

This command points the `az` CLI away from the public Azure management REST API and toward the LocalStack for Azure emulator API.
To revert this configuration, run:

```bash
azlocal stop-interception
lstk az stop-interception
```

This reconfigures the `az` CLI to send commands to the official Azure management REST API.
Expand Down
Loading
Loading