From 0aad37c89a9427a9f20f433dd639e993b9a3a043 Mon Sep 17 00:00:00 2001 From: HarshCasper Date: Fri, 27 Feb 2026 17:01:28 +0530 Subject: [PATCH 01/11] add Azure Storage Account service doc --- .../docs/azure/services/storage-accounts.mdx | 195 ++++++++++++++++++ src/content/docs/azure/services/storage.mdx | 11 - 2 files changed, 195 insertions(+), 11 deletions(-) create mode 100644 src/content/docs/azure/services/storage-accounts.mdx delete mode 100644 src/content/docs/azure/services/storage.mdx diff --git a/src/content/docs/azure/services/storage-accounts.mdx b/src/content/docs/azure/services/storage-accounts.mdx new file mode 100644 index 00000000..33932a45 --- /dev/null +++ b/src/content/docs/azure/services/storage-accounts.mdx @@ -0,0 +1,195 @@ +--- +title: "Storage Accounts" +description: Get started with Azure Storage Accounts on LocalStack +template: doc +--- + +import AzureFeatureCoverage from "../../../../components/feature-coverage/AzureFeatureCoverage"; + +## Introduction + +Azure Storage Accounts provide a unified namespace for Azure Storage services such as Blob, Queue, File, and Table. +They are the foundational resource used to store and organize application data at scale. +Most Azure storage workflows begin by provisioning and configuring a storage account. + +LocalStack for Azure lets you build and test storage account workflows locally using the same CLI-based flow as cloud environments. +The supported APIs are listed in the [API Coverage](#api-coverage) section. + +## Getting started + +This guide is designed for users new to Azure Storage Accounts and assumes basic knowledge of the Azure CLI and `azlocal`. + +Start by enabling interception so your `az` commands are routed to LocalStack: + +```bash +azlocal start_interception +``` + +The following example creates a storage account, inspects account details, manages access keys, and creates a blob container. + +### Create a resource group + +Create a resource group for your storage account resources: + +```bash +az group create --name rg-storage-demo --location westeurope +``` + +```bash title="Output" +{ + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-storage-demo", + "location": "westeurope", + "name": "rg-storage-demo", + "properties": { + "provisioningState": "Succeeded" + }, + "..." +} +``` + +### Create and inspect a storage account + +Create a storage account with the `StorageV2` kind and `Standard_LRS` SKU: + +```bash +az storage account create \ + --name stordoc86acct \ + --resource-group rg-storage-demo \ + --location westeurope \ + --sku Standard_LRS \ + --kind StorageV2 +``` + +```bash title="Output" +{ + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-storage-demo/providers/Microsoft.Storage/storageAccounts/stordoc86acct", + "name": "stordoc86acct", + "location": "westeurope", + "kind": "StorageV2", + "provisioningState": "Succeeded", + "primaryEndpoints": { + "blob": "https://stordoc86acctblob.localhost.localstack.cloud:4566", + "queue": "https://stordoc86acctqueue.localhost.localstack.cloud:4566", + "table": "https://stordoc86accttable.localhost.localstack.cloud:4566", + "..." + }, + "..." +} +``` + +List storage accounts in the resource group: + +```bash +az storage account list --resource-group rg-storage-demo +``` + +```bash title="Output" +[ + { + "name": "stordoc86acct", + "location": "westeurope", + "kind": "StorageV2", + "type": "Microsoft.Storage/storageAccounts", + "..." + } +] +``` + +### Manage account keys and connection string + +List the storage account access keys: + +```bash +az storage account keys list \ + --account-name stordoc86acct \ + --resource-group rg-storage-demo +``` + +```bash title="Output" +[ + { + "keyName": "key1", + "permissions": "FULL", + "value": "MWFjYTgyZjgtYzU0My00NjE0LThmZDctNzlkODg5ZjU4ZTE5", + "..." + }, + { + "keyName": "key2", + "permissions": "FULL", + "value": "NzliNzVhN2EtYTcwZC00ZTg4LWJkMTQtYjg4MWNlMDJjZDcx", + "..." + } +] +``` + +Regenerate the primary key: + +```bash +az storage account keys renew \ + --account-name stordoc86acct \ + --resource-group rg-storage-demo \ + --key key1 +``` + +Fetch a connection string for data-plane operations: + +```bash +az storage account show-connection-string \ + --name stordoc86acct \ + --resource-group rg-storage-demo +``` + +```bash title="Output" +{ + "connectionString": "DefaultEndpointsProtocol=https;EndpointSuffix=localhost.localstack.cloud:4566;AccountName=stordoc86acct;AccountKey=...;BlobEndpoint=https://stordoc86acctblob.localhost.localstack.cloud:4566;FileEndpoint=https://stordoc86acctfile.localhost.localstack.cloud:4566;QueueEndpoint=https://stordoc86acctqueue.localhost.localstack.cloud:4566;TableEndpoint=https://stordoc86accttable.localhost.localstack.cloud:4566" +} +``` + +### Create and inspect a blob container + +Store the account connection string in an environment variable: + +```bash +CONNECTION_STRING=$(az storage account show-connection-string \ + --name stordoc86acct \ + --resource-group rg-storage-demo \ + --query connectionString -o tsv) +``` + +Create a blob container in the storage account: + +```bash +az storage container create \ + --name docs-container \ + --connection-string "$CONNECTION_STRING" +``` + +```bash title="Output" +{ + "created": true +} +``` + +List containers in the storage account: + +```bash +az storage container list --connection-string "$CONNECTION_STRING" +``` + +```bash title="Output" +[ + { + "name": "docs-container", + "properties": { + "hasImmutabilityPolicy": false, + "hasLegalHold": false, + "..." + }, + "..." + } +] +``` + +## API Coverage + + diff --git a/src/content/docs/azure/services/storage.mdx b/src/content/docs/azure/services/storage.mdx deleted file mode 100644 index 71afb654..00000000 --- a/src/content/docs/azure/services/storage.mdx +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: "Storage" -description: API coverage for Microsoft.Storage in LocalStack for Azure. -template: doc ---- - -import AzureFeatureCoverage from "../../../../components/feature-coverage/AzureFeatureCoverage"; - -## API Coverage - - From 23e4d6171ad0fa1a31ee21cc6c36f348306c6d47 Mon Sep 17 00:00:00 2001 From: Paolo Salvatori Date: Wed, 4 Mar 2026 08:37:00 +0100 Subject: [PATCH 02/11] Extend Storage Account article, strip Blob part --- .../docs/azure/services/storage-accounts.mdx | 163 ++++++++++-------- 1 file changed, 87 insertions(+), 76 deletions(-) diff --git a/src/content/docs/azure/services/storage-accounts.mdx b/src/content/docs/azure/services/storage-accounts.mdx index 33932a45..54e3b27c 100644 --- a/src/content/docs/azure/services/storage-accounts.mdx +++ b/src/content/docs/azure/services/storage-accounts.mdx @@ -8,51 +8,57 @@ import AzureFeatureCoverage from "../../../../components/feature-coverage/AzureF ## Introduction -Azure Storage Accounts provide a unified namespace for Azure Storage services such as Blob, Queue, File, and Table. -They are the foundational resource used to store and organize application data at scale. -Most Azure storage workflows begin by provisioning and configuring a storage account. +An Azure storage account serves as a centralized container for all your data objects, including blobs, files, queues, and tables. It provides a unique, globally accessible namespace reachable via HTTP or HTTPS. For more information, see [Overview of storage accounts](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-overview). + +LocalStack for Azure provides a local environment for building and testing applications that make use of blobs, queues, and tables. For more information, see: + +- [Blob Storage](/azure/services/blob-storage) +- [Queue Storage](/azure/services/queue-storage) +- [Table Storage](/azure/services/table-storage) -LocalStack for Azure lets you build and test storage account workflows locally using the same CLI-based flow as cloud environments. The supported APIs are listed in the [API Coverage](#api-coverage) section. ## Getting started -This guide is designed for users new to Azure Storage Accounts and assumes basic knowledge of the Azure CLI and `azlocal`. - -Start by enabling interception so your `az` commands are routed to LocalStack: +This guide is designed for users new to Azure Storage Accounts and Blob Storage and assumes basic knowledge of the Azure CLI and our `azlocal` wrapper script. -```bash -azlocal start_interception -``` +Start your LocalStack container using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). -The following example creates a storage account, inspects account details, manages access keys, and creates a blob container. +> [!NOTE] +> As an alternative to using the `azlocal` CLI, customers can run `az start-interception`. This command points the `az` CLI away from the public Azure cloud management API and toward the local emulator API. +To revert this configuration, use `azlocal stop-interception`, which re-configures the CLI to send commands to the official Azure platform management REST API. +At this time, there is no full parity between `azlocal` commands and `az` commands after running `az start-interception`. Therefore, this technique is not fully interchangeable. ### Create a resource group Create a resource group for your storage account resources: ```bash -az group create --name rg-storage-demo --location westeurope +azlocal group create \ + --name rg-storage-demo \ + --location westeurope ``` ```bash title="Output" { "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-storage-demo", "location": "westeurope", + "managedBy": null, "name": "rg-storage-demo", "properties": { "provisioningState": "Succeeded" }, - "..." + "tags": null, + "type": "Microsoft.Resources/resourceGroups" } ``` -### Create and inspect a storage account +### Create a storage account -Create a storage account with the `StorageV2` kind and `Standard_LRS` SKU: +Create an [Azure storage account](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-overview) with the `StorageV2` kind and `Standard_LRS` SKU: ```bash -az storage account create \ +azlocal storage account create \ --name stordoc86acct \ --resource-group rg-storage-demo \ --location westeurope \ @@ -62,45 +68,76 @@ az storage account create \ ```bash title="Output" { + ... "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-storage-demo/providers/Microsoft.Storage/storageAccounts/stordoc86acct", - "name": "stordoc86acct", - "location": "westeurope", + ... "kind": "StorageV2", - "provisioningState": "Succeeded", + "location": "westeurope", + "name": "stordoc86acct", + ... "primaryEndpoints": { "blob": "https://stordoc86acctblob.localhost.localstack.cloud:4566", "queue": "https://stordoc86acctqueue.localhost.localstack.cloud:4566", "table": "https://stordoc86accttable.localhost.localstack.cloud:4566", - "..." + ... }, - "..." + "provisioningState": "Succeeded", + ... } ``` -List storage accounts in the resource group: +### Authentication + +There are three ways to authenticate storage blob commands against the emulator: + +#### Storage account key + +Retrieve the account key and pass it with `--account-name` and `--account-key`: ```bash -az storage account list --resource-group rg-storage-demo +ACCOUNT_KEY=$(azlocal storage account keys list \ + --account-name stordoc86acct \ + --resource-group rg-storage-demo \ + --query "[0].value" \ + --output tsv) + +azlocal storage container list \ + --account-name stordoc86acct \ + --account-key "$ACCOUNT_KEY" ``` -```bash title="Output" -[ - { - "name": "stordoc86acct", - "location": "westeurope", - "kind": "StorageV2", - "type": "Microsoft.Storage/storageAccounts", - "..." - } -] +#### Login credentials + +Use `--auth-mode login` to authenticate with the current session credentials: + +```bash +azlocal storage container list \ + --account-name stordoc86acct \ + --auth-mode login ``` +#### Connection string + +Bundle the account name and key into a single value: + +```bash +CONNECTION_STRING=$(azlocal storage account show-connection-string \ + --name stordoc86acct \ + --resource-group rg-storage-demo \ + --query connectionString -o tsv) + +azlocal storage container list \ + --connection-string "$CONNECTION_STRING" +``` + +The remaining examples in this guide use connection strings for brevity. + ### Manage account keys and connection string List the storage account access keys: ```bash -az storage account keys list \ +azlocal storage account keys list \ --account-name stordoc86acct \ --resource-group rg-storage-demo ``` @@ -125,7 +162,7 @@ az storage account keys list \ Regenerate the primary key: ```bash -az storage account keys renew \ +azlocal storage account keys renew \ --account-name stordoc86acct \ --resource-group rg-storage-demo \ --key key1 @@ -134,7 +171,7 @@ az storage account keys renew \ Fetch a connection string for data-plane operations: ```bash -az storage account show-connection-string \ +azlocal storage account show-connection-string \ --name stordoc86acct \ --resource-group rg-storage-demo ``` @@ -145,50 +182,24 @@ az storage account show-connection-string \ } ``` -### Create and inspect a blob container - -Store the account connection string in an environment variable: - -```bash -CONNECTION_STRING=$(az storage account show-connection-string \ - --name stordoc86acct \ - --resource-group rg-storage-demo \ - --query connectionString -o tsv) -``` - -Create a blob container in the storage account: - -```bash -az storage container create \ - --name docs-container \ - --connection-string "$CONNECTION_STRING" -``` +## Features +- **Control plane (ARM) REST API**: Storage account CRUD (create, read, update, delete, list), account key management, and name availability checks via Azure Resource Manager. +- **Multiple authentication modes**: Storage account key, login credentials, and connection strings. +- **Storage account management**: Create, update, delete, and list storage accounts. Supports `StorageV2`, `BlobStorage`, and `Storage` account kinds with configurable SKU, access tier, and TLS version. +- **Account key management**: List and regenerate storage account keys (`key1`/`key2`). +- **Connection string generation**: Retrieve ready-to-use connection strings containing all service endpoints (Blob, Queue, Table, File). -```bash title="Output" -{ - "created": true -} -``` +## Limitations +- **Header validation**: Unsupported request headers or parameters are silently accepted instead of being rejected. +- **API version enforcement**: The emulator does not validate the `x-ms-version` header; all API versions are accepted. -List containers in the storage account: +## Samples -```bash -az storage container list --connection-string "$CONNECTION_STRING" -``` +The following sample demonstrates how to use Storage Accounts with LocalStack for Azure: -```bash title="Output" -[ - { - "name": "docs-container", - "properties": { - "hasImmutabilityPolicy": false, - "hasLegalHold": false, - "..." - }, - "..." - } -] -``` +- [Azure Functions Sample with LocalStack for Azure](https://github.com/localstack/localstack-azure-samples/tree/main/samples/function-app-storage-http/dotnet) +- [Azure Functions App with Managed Identity](https://github.com/localstack/localstack-azure-samples/tree/main/samples/function-app-managed-identity/python) +- [Azure Web App with Managed Identity](https://github.com/localstack/localstack-azure-samples/tree/main/samples/web-app-managed-identity/python) ## API Coverage From 15786974fad5394da58dec031921affad6aaaf3e Mon Sep 17 00:00:00 2001 From: Paolo Salvatori Date: Wed, 4 Mar 2026 11:12:08 +0100 Subject: [PATCH 03/11] Remove (ARM) from control plane --- src/content/docs/azure/services/storage-accounts.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/azure/services/storage-accounts.mdx b/src/content/docs/azure/services/storage-accounts.mdx index 54e3b27c..1082f999 100644 --- a/src/content/docs/azure/services/storage-accounts.mdx +++ b/src/content/docs/azure/services/storage-accounts.mdx @@ -183,7 +183,7 @@ azlocal storage account show-connection-string \ ``` ## Features -- **Control plane (ARM) REST API**: Storage account CRUD (create, read, update, delete, list), account key management, and name availability checks via Azure Resource Manager. +- **Control plane REST API**: Storage account CRUD (create, read, update, delete, list), account key management, and name availability checks via Azure Resource Manager. - **Multiple authentication modes**: Storage account key, login credentials, and connection strings. - **Storage account management**: Create, update, delete, and list storage accounts. Supports `StorageV2`, `BlobStorage`, and `Storage` account kinds with configurable SKU, access tier, and TLS version. - **Account key management**: List and regenerate storage account keys (`key1`/`key2`). From aedf508a5b3801136990f07355669c2610ecfa37 Mon Sep 17 00:00:00 2001 From: Paolo Salvatori Date: Wed, 4 Mar 2026 11:35:07 +0100 Subject: [PATCH 04/11] Remove storage account link --- src/content/docs/azure/services/storage-accounts.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/azure/services/storage-accounts.mdx b/src/content/docs/azure/services/storage-accounts.mdx index 1082f999..29e95058 100644 --- a/src/content/docs/azure/services/storage-accounts.mdx +++ b/src/content/docs/azure/services/storage-accounts.mdx @@ -55,7 +55,7 @@ azlocal group create \ ### Create a storage account -Create an [Azure storage account](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-overview) with the `StorageV2` kind and `Standard_LRS` SKU: +Create a storage account with the `StorageV2` kind and `Standard_LRS` SKU: ```bash azlocal storage account create \ From 98e55d74e99ecc85e8209c49fd8b52d34a31b601 Mon Sep 17 00:00:00 2001 From: Paolo Salvatori Date: Wed, 4 Mar 2026 15:36:18 +0100 Subject: [PATCH 05/11] Fix azlocal note --- src/content/docs/azure/services/storage-accounts.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/content/docs/azure/services/storage-accounts.mdx b/src/content/docs/azure/services/storage-accounts.mdx index 29e95058..341f8b52 100644 --- a/src/content/docs/azure/services/storage-accounts.mdx +++ b/src/content/docs/azure/services/storage-accounts.mdx @@ -24,10 +24,11 @@ This guide is designed for users new to Azure Storage Accounts and Blob Storage Start your LocalStack container using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). -> [!NOTE] -> As an alternative to using the `azlocal` CLI, customers can run `az start-interception`. This command points the `az` CLI away from the public Azure cloud management API and toward the local emulator API. +:::note +As an alternative to using the `azlocal` CLI, customers can run `az start-interception`. This command points the `az` CLI away from the public Azure cloud management API and toward the local emulator API. To revert this configuration, use `azlocal stop-interception`, which re-configures the CLI to send commands to the official Azure platform management REST API. At this time, there is no full parity between `azlocal` commands and `az` commands after running `az start-interception`. Therefore, this technique is not fully interchangeable. +::: ### Create a resource group From 8c2429f2ea4b9a543fca7634cb9be7d1e3a1cb55 Mon Sep 17 00:00:00 2001 From: Paolo Salvatori Date: Wed, 4 Mar 2026 15:44:58 +0100 Subject: [PATCH 06/11] Fix samples --- src/content/docs/azure/services/storage-accounts.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/azure/services/storage-accounts.mdx b/src/content/docs/azure/services/storage-accounts.mdx index 341f8b52..55c8e38d 100644 --- a/src/content/docs/azure/services/storage-accounts.mdx +++ b/src/content/docs/azure/services/storage-accounts.mdx @@ -196,7 +196,7 @@ azlocal storage account show-connection-string \ ## Samples -The following sample demonstrates how to use Storage Accounts with LocalStack for Azure: +The following samples demonstrate how to use Storage Accounts with LocalStack for Azure: - [Azure Functions Sample with LocalStack for Azure](https://github.com/localstack/localstack-azure-samples/tree/main/samples/function-app-storage-http/dotnet) - [Azure Functions App with Managed Identity](https://github.com/localstack/localstack-azure-samples/tree/main/samples/function-app-managed-identity/python) From 66480a3562eaa846789bcad8dc45ad4e24179791 Mon Sep 17 00:00:00 2001 From: Paolo Salvatori Date: Thu, 5 Mar 2026 08:20:00 +0100 Subject: [PATCH 07/11] Improve node wording --- .../docs/azure/services/storage-accounts.mdx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/content/docs/azure/services/storage-accounts.mdx b/src/content/docs/azure/services/storage-accounts.mdx index 55c8e38d..72fab646 100644 --- a/src/content/docs/azure/services/storage-accounts.mdx +++ b/src/content/docs/azure/services/storage-accounts.mdx @@ -1,6 +1,6 @@ --- -title: "Storage Accounts" -description: Get started with Azure Storage Accounts on LocalStack +title: "Storage Account" +description: Get started with Azure Storage Accounts in LocalStack template: doc --- @@ -25,9 +25,16 @@ This guide is designed for users new to Azure Storage Accounts and Blob Storage Start your LocalStack container using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). :::note -As an alternative to using the `azlocal` CLI, customers can run `az start-interception`. This command points the `az` CLI away from the public Azure cloud management API and toward the local emulator API. -To revert this configuration, use `azlocal stop-interception`, which re-configures the CLI to send commands to the official Azure platform management REST API. -At this time, there is no full parity between `azlocal` commands and `az` commands after running `az start-interception`. Therefore, this technique is not fully interchangeable. +As an alternative to using the `azlocal` CLI, users can run: + +`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: + +`azlocal stop-interception` + +This reconfigures the `az` CLI to send commands to the official Azure management REST API. At this time, there is no full parity between `azlocal` and `az` commands after running `az start-interception`. Therefore, this technique is not fully interchangeable. ::: ### Create a resource group From 8aad38df309ccf576eb6f9c542ea3015e9bce186 Mon Sep 17 00:00:00 2001 From: Paolo Salvatori Date: Thu, 5 Mar 2026 08:25:17 +0100 Subject: [PATCH 08/11] Improve node wording 2 --- src/content/docs/azure/services/storage-accounts.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/azure/services/storage-accounts.mdx b/src/content/docs/azure/services/storage-accounts.mdx index 72fab646..fef8e112 100644 --- a/src/content/docs/azure/services/storage-accounts.mdx +++ b/src/content/docs/azure/services/storage-accounts.mdx @@ -211,4 +211,4 @@ The following samples demonstrate how to use Storage Accounts with LocalStack fo ## API Coverage - + \ No newline at end of file From 20eb8f80c9561c76594c1b50c7b147b2e203c294 Mon Sep 17 00:00:00 2001 From: Paolo Salvatori Date: Wed, 18 Mar 2026 09:30:29 +0100 Subject: [PATCH 09/11] Fixes typo in az/azlocal note --- src/content/docs/azure/services/storage-accounts.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/azure/services/storage-accounts.mdx b/src/content/docs/azure/services/storage-accounts.mdx index fef8e112..13e29183 100644 --- a/src/content/docs/azure/services/storage-accounts.mdx +++ b/src/content/docs/azure/services/storage-accounts.mdx @@ -27,9 +27,9 @@ Start your LocalStack container using your preferred method. For more informatio :::note As an alternative to using the `azlocal` CLI, users can run: -`az start-interception` +`azlocal start-interception` -This command points the `az` CLI away from the public Azure management REST API and toward the LocalStack for Azure emulator API. +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` From d0bb0b3509192e8d56657627df8c90c228a64f94 Mon Sep 17 00:00:00 2001 From: HarshCasper Date: Thu, 9 Apr 2026 17:29:31 +0530 Subject: [PATCH 10/11] fixes --- .../docs/azure/services/storage-accounts.mdx | 48 ++++++++++--------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/src/content/docs/azure/services/storage-accounts.mdx b/src/content/docs/azure/services/storage-accounts.mdx index 13e29183..7b2ebae0 100644 --- a/src/content/docs/azure/services/storage-accounts.mdx +++ b/src/content/docs/azure/services/storage-accounts.mdx @@ -16,33 +16,33 @@ LocalStack for Azure provides a local environment for building and testing appli - [Queue Storage](/azure/services/queue-storage) - [Table Storage](/azure/services/table-storage) -The supported APIs are listed in the [API Coverage](#api-coverage) section. +The supported APIs are available on our [API Coverage section](#api-coverage), which provides information on the extent of Storage Account's integration with LocalStack. ## Getting started -This guide is designed for users new to Azure Storage Accounts and Blob Storage and assumes basic knowledge of the Azure CLI and our `azlocal` wrapper script. +This guide is designed for users new to Azure Storage Accounts and assumes basic knowledge of the Azure CLI and our `azlocal` wrapper script. -Start your LocalStack container using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). +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: -:::note -As an alternative to using the `azlocal` CLI, users can run: - -`azlocal start-interception` +```bash +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. +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: -`azlocal stop-interception` +```bash +azlocal stop-interception +``` -This reconfigures the `az` CLI to send commands to the official Azure management REST API. At this time, there is no full parity between `azlocal` and `az` commands after running `az start-interception`. Therefore, this technique is not fully interchangeable. -::: +This reconfigures the `az` CLI to send commands to the official Azure management REST API. ### Create a resource group Create a resource group for your storage account resources: ```bash -azlocal group create \ +az group create \ --name rg-storage-demo \ --location westeurope ``` @@ -66,7 +66,7 @@ azlocal group create \ Create a storage account with the `StorageV2` kind and `Standard_LRS` SKU: ```bash -azlocal storage account create \ +az storage account create \ --name stordoc86acct \ --resource-group rg-storage-demo \ --location westeurope \ @@ -96,20 +96,20 @@ azlocal storage account create \ ### Authentication -There are three ways to authenticate storage blob commands against the emulator: +There are three ways to authenticate storage commands against the emulator: #### Storage account key Retrieve the account key and pass it with `--account-name` and `--account-key`: ```bash -ACCOUNT_KEY=$(azlocal storage account keys list \ +ACCOUNT_KEY=$(az storage account keys list \ --account-name stordoc86acct \ --resource-group rg-storage-demo \ --query "[0].value" \ --output tsv) -azlocal storage container list \ +az storage container list \ --account-name stordoc86acct \ --account-key "$ACCOUNT_KEY" ``` @@ -119,7 +119,7 @@ azlocal storage container list \ Use `--auth-mode login` to authenticate with the current session credentials: ```bash -azlocal storage container list \ +az storage container list \ --account-name stordoc86acct \ --auth-mode login ``` @@ -129,12 +129,12 @@ azlocal storage container list \ Bundle the account name and key into a single value: ```bash -CONNECTION_STRING=$(azlocal storage account show-connection-string \ +CONNECTION_STRING=$(az storage account show-connection-string \ --name stordoc86acct \ --resource-group rg-storage-demo \ --query connectionString -o tsv) -azlocal storage container list \ +az storage container list \ --connection-string "$CONNECTION_STRING" ``` @@ -145,7 +145,7 @@ The remaining examples in this guide use connection strings for brevity. List the storage account access keys: ```bash -azlocal storage account keys list \ +az storage account keys list \ --account-name stordoc86acct \ --resource-group rg-storage-demo ``` @@ -170,7 +170,7 @@ azlocal storage account keys list \ Regenerate the primary key: ```bash -azlocal storage account keys renew \ +az storage account keys renew \ --account-name stordoc86acct \ --resource-group rg-storage-demo \ --key key1 @@ -179,7 +179,7 @@ azlocal storage account keys renew \ Fetch a connection string for data-plane operations: ```bash -azlocal storage account show-connection-string \ +az storage account show-connection-string \ --name stordoc86acct \ --resource-group rg-storage-demo ``` @@ -191,6 +191,9 @@ azlocal storage account show-connection-string \ ``` ## Features + +The Storage Account emulator supports the following features: + - **Control plane REST API**: Storage account CRUD (create, read, update, delete, list), account key management, and name availability checks via Azure Resource Manager. - **Multiple authentication modes**: Storage account key, login credentials, and connection strings. - **Storage account management**: Create, update, delete, and list storage accounts. Supports `StorageV2`, `BlobStorage`, and `Storage` account kinds with configurable SKU, access tier, and TLS version. @@ -198,6 +201,7 @@ azlocal storage account show-connection-string \ - **Connection string generation**: Retrieve ready-to-use connection strings containing all service endpoints (Blob, Queue, Table, File). ## Limitations + - **Header validation**: Unsupported request headers or parameters are silently accepted instead of being rejected. - **API version enforcement**: The emulator does not validate the `x-ms-version` header; all API versions are accepted. From 7540d32a1f6fd0c521f62d007edf2007da43b780 Mon Sep 17 00:00:00 2001 From: Harsh Mishra Date: Thu, 9 Apr 2026 17:35:33 +0530 Subject: [PATCH 11/11] Apply suggestions from code review Co-authored-by: Paolo Salvatori --- src/content/docs/azure/services/storage-accounts.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/content/docs/azure/services/storage-accounts.mdx b/src/content/docs/azure/services/storage-accounts.mdx index 7b2ebae0..cfca6deb 100644 --- a/src/content/docs/azure/services/storage-accounts.mdx +++ b/src/content/docs/azure/services/storage-accounts.mdx @@ -84,9 +84,9 @@ az storage account create \ "name": "stordoc86acct", ... "primaryEndpoints": { - "blob": "https://stordoc86acctblob.localhost.localstack.cloud:4566", - "queue": "https://stordoc86acctqueue.localhost.localstack.cloud:4566", - "table": "https://stordoc86accttable.localhost.localstack.cloud:4566", + "blob": "https://stordoc86acct.blob.core.azure.localhost.localstack.cloud:4566", + "queue": "https://stordoc86acct.queue.core.azure.localhost.localstack.cloud:4566", + "table": "https://stordoc86acct.table.core.azure.localhost.localstack.cloud:4566", ... }, "provisioningState": "Succeeded", @@ -186,7 +186,7 @@ az storage account show-connection-string \ ```bash title="Output" { - "connectionString": "DefaultEndpointsProtocol=https;EndpointSuffix=localhost.localstack.cloud:4566;AccountName=stordoc86acct;AccountKey=...;BlobEndpoint=https://stordoc86acctblob.localhost.localstack.cloud:4566;FileEndpoint=https://stordoc86acctfile.localhost.localstack.cloud:4566;QueueEndpoint=https://stordoc86acctqueue.localhost.localstack.cloud:4566;TableEndpoint=https://stordoc86accttable.localhost.localstack.cloud:4566" + "connectionString": "DefaultEndpointsProtocol=https;EndpointSuffix=core.azure.localhost.localstack.cloud:4566;AccountName=stordoc86acct;AccountKey=YWQ5Y2Q2NDYtZTJmOC00ZjU3LWFmOTEtNzk5MjAxNzE1OWQx;BlobEndpoint=https://stordoc86acct.blob.core.azure.localhost.localstack.cloud:4566;FileEndpoint=https://stordoc86acct.file.core.azure.localhost.localstack.cloud:4566;QueueEndpoint=https://stordoc86acct.queue.core.azure.localhost.localstack.cloud:4566;TableEndpoint=https://stordoc86acct.table.core.azure.localhost.localstack.cloud:4566" } ```