lstk az Azure CLI proxy#251
Draft
carole-lavillonniere wants to merge 1 commit into
Draft
Conversation
lstk setup azure for registering LocalStack custom cloudlstk setup azure for registering custom cloud
lstk setup azure for registering custom cloudlstk az Azure CLI integration via LocalStack proxy
5c76648 to
62261ac
Compare
62261ac to
c6c0934
Compare
lstk az Azure CLI integration via LocalStack proxylstk az Azure CLI proxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Bring Azure CLI integration into lstk so users can run
azcommands against the LocalStack Azure emulator. Uses the proxy/wrap model (azlocal's wrap mode), notstart-interceptionglobal mutation — it mirrorslstk awsand leaves the user's global~/.azureuntouched.Depends on #262 (
Support starting the Azure emulator) to actually launch the emulator vialstk start.Approach
The Azure CLI has no
--endpoint-url/--profile; the only isolation knob isAZURE_CONFIG_DIR. So:lstk setup azureprepares 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>runsaz <args>withAZURE_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
Setup
Proxy
Not affecting global az config
Trace