lstk az Azure CLI proxy#251
Open
carole-lavillonniere wants to merge 4 commits into
Open
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
62261ac to
c6c0934
Compare
lstk az Azure CLI integration via LocalStack proxylstk az Azure CLI proxy
9c33edc to
f32fd1c
Compare
5ee72f1 to
9164ef4
Compare
8209390 to
273d465
Compare
273d465 to
d988329
Compare
d988329 to
00775ab
Compare
00775ab to
ad41209
Compare
bblommers
approved these changes
Jun 2, 2026
bblommers
left a comment
There was a problem hiding this comment.
Awesome - thanks @carole-lavillonniere!
Note that I have not actually tested this out, but the Azure-specific parts LGTM 🙏
Collaborator
|
@bblommers Not sure if it's a known issue, but when trying az login, I get this error which believe it's on the emulator or az cli config: |
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 wrap model (isolatedAZURE_CONFIG_DIR), 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. Inside that isolated dir we register a custom Azure cloud (LocalStack) whose endpoints point at the LocalStack Azure emulator, activate it, disable instance discovery, and perform a one-time dummy service-principal login:lstk setup azureruns (against the isolatedAZURE_CONFIG_DIR):az cloud register|update --name LocalStack --cloud-config '{…}'az cloud set --name LocalStackaz config set core.instance_discovery=falseaz login --service-principal -u any-app -p any-pass --tenant anytenantlstk az <args>runsaz <args>with justAZURE_CONFIG_DIRset — no HTTP(S) forward proxy.aztalks directly to LocalStack for Azure service URLs and to the real internet for everything else (extension downloads, AAD static content, etc.).Closes FLC-656
Error when not setup first
Setup
Proxy
Not affecting global az config
Trace