Using Azure CLI in your Stacks
Last updated: September 8, 2025
If you need access to the Azure CLI, you can configure your stack to use the Azure-specific runner image to access Azure CLI commands in your workflows.
Configuring the Azure Runner Image
To ensure Azure CLI is available in your worker environment:
Navigate to your stack's settings
Under the "Runner image" setting, set the value to:
public.ecr.aws/spacelift/runner-terraform:azure-latest
This configuration is necessary even when using a private worker pool with VMSS, as the workers still pull a Docker image to run the jobs. The Azure-specific image includes the Azure CLI and other Azure-specific tools.
This can also be set through the provider or through a runtime configuration file.
Troubleshooting
If you see an error like "Az command not found" when running local-exec provisioners, this indicates you're using the default runner image instead of the Azure-specific one. Update your runner image configuration as described above to resolve this issue.
For more information about available runner images, see our documentation on standard runner image flavors.