Skip to content

lstk az Azure CLI proxy#251

Draft
carole-lavillonniere wants to merge 1 commit into
az-supportfrom
flc-656-register-azure-custom-cloud-in-lstk
Draft

lstk az Azure CLI proxy#251
carole-lavillonniere wants to merge 1 commit into
az-supportfrom
flc-656-register-azure-custom-cloud-in-lstk

Conversation

@carole-lavillonniere
Copy link
Copy Markdown
Collaborator

@carole-lavillonniere carole-lavillonniere commented May 19, 2026

Motivation

Bring Azure CLI integration into lstk so users can run az commands against the LocalStack Azure emulator. Uses the proxy/wrap model (azlocal's wrap mode), not start-interception global mutation — it mirrors lstk aws and leaves the user's global ~/.azure untouched.

Depends on #262 (Support starting the Azure emulator) to actually launch the emulator via lstk start.

Approach

The Azure CLI has no --endpoint-url/--profile; the only isolation knob is AZURE_CONFIG_DIR. So:

  • lstk setup azure prepares an isolated config dir (<lstk-config-dir>/azure/): discovers LocalStack's proxy via /_localstack/proxy, caches the LocalStack CA (appended to the system trust store), disables Azure CLI telemetry, and does a one-time dummy service-principal login routed through the proxy.
  • lstk az <args> runs az <args> with AZURE_CONFIG_DIR + HTTP(S)_PROXY (LocalStack proxy) + REQUESTS_CA_BUNDLE/SSL_CERT_FILE (cached CA). Because all traffic is proxied, no per-service endpoint registration is needed — new emulator services work without CLI changes.

Closes FLC-656

Error when not setup first

az-setup-first

Setup

az-setup

Proxy

az-proxy

Not affecting global az config

az-not-global

Trace

image

@carole-lavillonniere carole-lavillonniere changed the title Add lstk setup azure for registering LocalStack custom cloud Add lstk setup azure for registering custom cloud May 19, 2026
@carole-lavillonniere carole-lavillonniere changed the title Add lstk setup azure for registering custom cloud Add lstk az Azure CLI integration via LocalStack proxy May 27, 2026
@carole-lavillonniere carole-lavillonniere changed the base branch from main to az-support May 27, 2026 12:40
@carole-lavillonniere carole-lavillonniere force-pushed the flc-656-register-azure-custom-cloud-in-lstk branch from 5c76648 to 62261ac Compare May 28, 2026 12:46
@carole-lavillonniere carole-lavillonniere force-pushed the flc-656-register-azure-custom-cloud-in-lstk branch from 62261ac to c6c0934 Compare May 28, 2026 12:46
@carole-lavillonniere carole-lavillonniere changed the title Add lstk az Azure CLI integration via LocalStack proxy lstk az Azure CLI proxy May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant