Skip to content
Get Started for Free

lstk Cloud & IaC Commands

lstk proxies developer tools so they run directly against LocalStack.

Run Azure CLI commands against the running LocalStack Azure emulator. lstk az runs az with an isolated AZURE_CONFIG_DIR in which a custom Azure cloud is registered against LocalStack’s endpoints, so your global ~/.azure configuration is left untouched and plain az keeps talking to real Azure.

Run lstk setup azure once before using this mode. Arguments are forwarded to the host az binary, and its exit code and output are passed through unchanged. lstk’s own flags (--non-interactive, --config) are consumed by lstk rather than forwarded, for example lstk az --non-interactive … suppresses the loading spinner instead of passing the flag to az.

Terminal window
lstk az group list
lstk az storage account list

The Azure CLI has no --endpoint-url/--profile equivalent, so the isolation relies entirely on the dedicated config directory prepared by setup azure.

If a script must invoke plain az (not lstk az), you can redirect your global ~/.azure to LocalStack instead:

Terminal window
# Point global 'az' at the LocalStack Azure emulator
lstk az start-interception
# Switch back to real Azure
lstk az stop-interception

start-interception registers and activates the LocalStack cloud in your global Azure configuration so every az invocation targets LocalStack until you stop it. stop-interception switches the active cloud back to AzureCloud (override with --cloud <name>) and re-enables instance discovery, but only when LocalStack is still the active cloud, to avoid clobbering an unrelated selection.

Was this page helpful?