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
39 changes: 20 additions & 19 deletions src/content/docs/azure/integrations/az.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,14 @@ 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.
Comment thread
quetzalliwrites marked this conversation as resolved.
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:

```
$ 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
This guide uses [`lstk`](/aws/developer-tools/running-localstack/lstk/) to point the `az` CLI at the Azure emulator.

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

```
$ azlocal start_interception
$ lstk az start-interception
```

### Create and manage the Resource Group
Expand Down Expand Up @@ -66,8 +51,24 @@ $ az group delete --name MyResourceGroup --yes
When you're done using the Azure Emulator, you can run the following command:

```
$ azlocal stop_interception
$ lstk az stop-interception
```

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Though this is technically true, I think it's easier to comprehend if we say now it points to the real Azure cloud


### Alternative: prefixed commands

Instead of interception, you can prefix each `az` command with `lstk az` individually, without changing your global `~/.azure` configuration. Run this once to prepare the integration:

```
$ lstk setup azure
```

Then prefix every command:

```
$ lstk az group create --name MyResourceGroup --location westeurope
$ lstk az group show --name MyResourceGroup
$ lstk az group delete --name MyResourceGroup --yes
```

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
17 changes: 2 additions & 15 deletions src/content/docs/azure/services/blob-storage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,14 @@ 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
As an alternative to using the `azlocal` CLI, users can run:

`azlocal 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`

This reconfigures the `az` CLI to send commands to the official Azure management REST API
:::

### Create a resource group

Create a resource group to contain your storage resources:
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