From b61a0ea8770ba41763999366567709203cea58e0 Mon Sep 17 00:00:00 2001 From: Bert Blommers Date: Thu, 5 Mar 2026 09:33:09 -0100 Subject: [PATCH] Upgrade to azlocal>=0.2.0 --- run-samples.sh | 2 +- samples/function-app-front-door/python/scripts/cleanup_all.sh | 4 ++-- samples/function-app-front-door/python/scripts/deploy_all.sh | 4 ++-- samples/function-app-managed-identity/python/bicep/README.md | 4 ++-- .../function-app-managed-identity/python/scripts/README.md | 4 ++-- .../function-app-managed-identity/python/terraform/README.md | 4 ++-- samples/function-app-storage-http/dotnet/scripts/README.md | 4 ++-- samples/servicebus/java/scripts/deploy.sh | 4 ++-- samples/web-app-managed-identity/python/scripts/README.md | 4 ++-- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/run-samples.sh b/run-samples.sh index ae6b220..c979b90 100755 --- a/run-samples.sh +++ b/run-samples.sh @@ -117,7 +117,7 @@ if command -v azlocal >/dev/null 2>&1; then echo "[DEBUG] azlocal command found, attempting login..." azlocal login || true echo "[DEBUG] Starting azlocal interception..." - azlocal start_interception + azlocal start-interception echo "[DEBUG] Setting default subscription..." azlocal account set --subscription "00000000-0000-0000-0000-000000000000" || true echo "[DEBUG] Checking azlocal account status..." diff --git a/samples/function-app-front-door/python/scripts/cleanup_all.sh b/samples/function-app-front-door/python/scripts/cleanup_all.sh index 7d5acf4..f436860 100644 --- a/samples/function-app-front-door/python/scripts/cleanup_all.sh +++ b/samples/function-app-front-door/python/scripts/cleanup_all.sh @@ -60,7 +60,7 @@ INTERCEPTION_STARTED="false" AZURE_CONFIG_DIR_CREATED="false" finish() { if [[ "$INTERCEPTION_STARTED" == "true" ]] && command -v azlocal >/dev/null 2>&1; then - set +e; azlocal stop_interception >/dev/null 2>&1 || true; set -e + set +e; azlocal stop-interception >/dev/null 2>&1 || true; set -e fi if [[ "$AZURE_CONFIG_DIR_CREATED" == "true" && -n "${AZURE_CONFIG_DIR:-}" && -d "$AZURE_CONFIG_DIR" ]]; then rm -rf "$AZURE_CONFIG_DIR" @@ -76,7 +76,7 @@ if [[ "$USE_LOCALSTACK" == "true" ]]; then echo "Error: --use-localstack specified but 'azlocal' was not found in PATH." >&2 exit 1 fi - if azlocal start_interception; then + if azlocal start-interception; then INTERCEPTION_STARTED="true"; echo "LocalStack interception started." else echo "Error: azlocal failed to start interception. Ensure LocalStack is running and azlocal is configured correctly." >&2 diff --git a/samples/function-app-front-door/python/scripts/deploy_all.sh b/samples/function-app-front-door/python/scripts/deploy_all.sh index 27fa508..3bac306 100644 --- a/samples/function-app-front-door/python/scripts/deploy_all.sh +++ b/samples/function-app-front-door/python/scripts/deploy_all.sh @@ -155,7 +155,7 @@ finish() { [[ -f "$ZIP_A" ]] && rm -f "$ZIP_A" [[ -f "$ZIP_B" ]] && rm -f "$ZIP_B" if [[ "$INTERCEPTION_STARTED" == "true" ]] && command -v azlocal >/dev/null 2>&1; then - azlocal stop_interception >/dev/null 2>&1 || true + azlocal stop-interception >/dev/null 2>&1 || true fi if [[ "$AZURE_CONFIG_DIR_CREATED" == "true" && -n "${AZURE_CONFIG_DIR:-}" && -d "$AZURE_CONFIG_DIR" ]]; then rm -rf "$AZURE_CONFIG_DIR" @@ -176,7 +176,7 @@ if [[ "$USE_LOCALSTACK" == "true" ]]; then echo "Error: --use-localstack specified but 'azlocal' not found in PATH." >&2 exit 1 fi - if azlocal start_interception; then + if azlocal start-interception; then INTERCEPTION_STARTED="true"; echo "LocalStack interception started." else echo "Error: azlocal failed to start interception. Ensure LocalStack is running." >&2 diff --git a/samples/function-app-managed-identity/python/bicep/README.md b/samples/function-app-managed-identity/python/bicep/README.md index b31fe38..375f9d0 100644 --- a/samples/function-app-managed-identity/python/bicep/README.md +++ b/samples/function-app-managed-identity/python/bicep/README.md @@ -55,7 +55,7 @@ param runtimeVersion = '3.13' The [deploy.sh](deploy.sh) script automates the deployment of all Azure resources and the sample application in a single step. Before running the script, customize the variable values based on your needs. In particular, use the `MANAGED_IDENTITY_TYPE` variable to specify the type of managed identity to provision: `SystemAssigned` or `UserAssigned`. > **Note** -> You can use the `azlocal` CLI as a drop-in replacement for the `az` CLI to direct all commands to the LocalStack for Azure emulator. Alternatively, run `azlocal start_interception` to automatically intercept and redirect all `az` commands to LocalStack. For more information, see [Get started with the az tool on LocalStack](https://azure.localstack.cloud/user-guides/sdks/az/). +> You can use the `azlocal` CLI as a drop-in replacement for the `az` CLI to direct all commands to the LocalStack for Azure emulator. Alternatively, run `azlocal start-interception` to automatically intercept and redirect all `az` commands to LocalStack. For more information, see [Get started with the az tool on LocalStack](https://azure.localstack.cloud/user-guides/sdks/az/). The [deploy.sh](deploy.sh) script executes the following steps: @@ -171,4 +171,4 @@ This will remove all Azure resources created by the CLI deployment script. - [Azure Bicep Documentation](https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/) - [Bicep Language Reference](https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/bicep-functions) -- [LocalStack for Azure Documentation](https://azure.localstack.cloud/) \ No newline at end of file +- [LocalStack for Azure Documentation](https://azure.localstack.cloud/) diff --git a/samples/function-app-managed-identity/python/scripts/README.md b/samples/function-app-managed-identity/python/scripts/README.md index 6c03036..3098b4f 100644 --- a/samples/function-app-managed-identity/python/scripts/README.md +++ b/samples/function-app-managed-identity/python/scripts/README.md @@ -46,7 +46,7 @@ This sample provides two Bash scripts to streamline the deployment process by au These scripts eliminate manual configuration steps and enable one-command deployment of the entire infrastructure. > [!NOTE] -> You can use the `azlocal` CLI as a drop-in replacement for the `az` CLI to direct all commands to the LocalStack for Azure emulator. Alternatively, run `azlocal start_interception` to automatically intercept and redirect all `az` commands to LocalStack. To revert back to the default behavior and send commands to the Azure cloud, run `azlocal stop_interception`. +> You can use the `azlocal` CLI as a drop-in replacement for the `az` CLI to direct all commands to the LocalStack for Azure emulator. Alternatively, run `azlocal start-interception` to automatically intercept and redirect all `az` commands to LocalStack. To revert back to the default behavior and send commands to the Azure cloud, run `azlocal stop-interception`. ## Deployment @@ -147,4 +147,4 @@ This will remove all Azure resources created by the CLI deployment script. ## Related Documentation - [Azure CLI Documentation](https://docs.microsoft.com/en-us/cli/azure/) -- [LocalStack for Azure Documentation](https://azure.localstack.cloud/) \ No newline at end of file +- [LocalStack for Azure Documentation](https://azure.localstack.cloud/) diff --git a/samples/function-app-managed-identity/python/terraform/README.md b/samples/function-app-managed-identity/python/terraform/README.md index 64dfcdf..e5b3e74 100644 --- a/samples/function-app-managed-identity/python/terraform/README.md +++ b/samples/function-app-managed-identity/python/terraform/README.md @@ -42,7 +42,7 @@ For more information on the sample application, see [Azure Functions App with Ma The [deploy.sh](deploy.sh) script automates the deployment of all Azure resources and the sample application in a single step. Before running the script, customize the variable values based on your needs. In particular, use the `MANAGED_IDENTITY_TYPE` variable to specify the type of managed identity to provision: `SystemAssigned` or `UserAssigned`. > **Note** -> You can use the `azlocal` CLI as a drop-in replacement for the `az` CLI to direct all commands to the LocalStack for Azure emulator. Alternatively, run `azlocal start_interception` to automatically intercept and redirect all `az` commands to LocalStack. Likewise, the `tflocal` is a local replacement for the standard `terraform` CLI, allowing you to run Terraform commands against LocalStack's Azure emulation environment. For more information, see [Get started with the az tool on LocalStack](https://azure.localstack.cloud/user-guides/sdks/az/). +> You can use the `azlocal` CLI as a drop-in replacement for the `az` CLI to direct all commands to the LocalStack for Azure emulator. Alternatively, run `azlocal start-interception` to automatically intercept and redirect all `az` commands to LocalStack. Likewise, the `tflocal` is a local replacement for the standard `terraform` CLI, allowing you to run Terraform commands against LocalStack's Azure emulation environment. For more information, see [Get started with the az tool on LocalStack](https://azure.localstack.cloud/user-guides/sdks/az/). The [deploy.sh](deploy.sh) script executes the following steps: @@ -175,4 +175,4 @@ This will remove all Azure resources created by the CLI deployment script. ## Related Documentation - [Terraform Azure Provider](https://registry.terraform.io/providers/hashicorp/azurerm/latest) -- [LocalStack for Azure Documentation](https://azure.localstack.cloud/) \ No newline at end of file +- [LocalStack for Azure Documentation](https://azure.localstack.cloud/) diff --git a/samples/function-app-storage-http/dotnet/scripts/README.md b/samples/function-app-storage-http/dotnet/scripts/README.md index 94b1618..9a4b50c 100644 --- a/samples/function-app-storage-http/dotnet/scripts/README.md +++ b/samples/function-app-storage-http/dotnet/scripts/README.md @@ -116,7 +116,7 @@ The script configures the following application settings for the gaming system: ### LocalStack-Specific Commands -1. `azlocal start_interception`: +1. `azlocal start-interception`: - Redirects Azure CLI calls to LocalStack endpoints - Enables local development without Azure subscription - Maintains compatibility with standard Azure CLI syntax @@ -126,7 +126,7 @@ The script configures the following application settings for the gaming system: - Wraps the Azure Functions Core Tools - Provides local testing environment for Azure Functions -3. `azlocal stop_interception`: +3. `azlocal stop-interception`: - Restores normal Azure CLI behavior - Cleans up LocalStack session state - Returns CLI to standard Azure cloud operations diff --git a/samples/servicebus/java/scripts/deploy.sh b/samples/servicebus/java/scripts/deploy.sh index 04ed85a..9dbc3c5 100755 --- a/samples/servicebus/java/scripts/deploy.sh +++ b/samples/servicebus/java/scripts/deploy.sh @@ -13,7 +13,7 @@ SERVICEBUS_QUEUE_NAME="myqueue" cd "$CURRENT_DIR" || exit # Redirect AZ calls to LocalStack -azlocal start_interception +azlocal start-interception # Create a resource group echo "Creating resource group [$RESOURCE_GROUP_NAME]..." @@ -45,6 +45,6 @@ az group delete \ --name $RESOURCE_GROUP_NAME \ --yes -azlocal stop_interception +azlocal stop-interception diff --git a/samples/web-app-managed-identity/python/scripts/README.md b/samples/web-app-managed-identity/python/scripts/README.md index b94c523..b35130d 100644 --- a/samples/web-app-managed-identity/python/scripts/README.md +++ b/samples/web-app-managed-identity/python/scripts/README.md @@ -66,7 +66,7 @@ See the script files for complete implementation. The scripts perform the follow These scripts eliminate manual configuration steps and enable one-command deployment of the entire infrastructure. > [!NOTE] -> You can use the `azlocal` CLI as a drop-in replacement for the `az` CLI to direct all commands to the LocalStack for Azure emulator. Alternatively, run `azlocal start_interception` to automatically intercept and redirect all `az` commands to LocalStack. To revert back to the default behavior and send commands to the Azure cloud, run `azlocal stop_interception`. +> You can use the `azlocal` CLI as a drop-in replacement for the `az` CLI to direct all commands to the LocalStack for Azure emulator. Alternatively, run `azlocal start-interception` to automatically intercept and redirect all `az` commands to LocalStack. To revert back to the default behavior and send commands to the Azure cloud, run `azlocal stop-interception`. ## Deployment @@ -166,4 +166,4 @@ This will remove all Azure resources created by the CLI deployment script. ## Related Documentation - [Azure CLI Documentation](https://docs.microsoft.com/en-us/cli/azure/) -- [LocalStack for Azure Documentation](https://azure.localstack.cloud/) \ No newline at end of file +- [LocalStack for Azure Documentation](https://azure.localstack.cloud/)