azure
crabbox azure groups Azure provider setup commands.
#azure login
crabbox azure login detects the active Azure subscription from the az CLI, validates credentials through DefaultAzureCredential, and stores subscription, tenant, and location in the user config. After this, direct-mode Azure commands work without any export AZURE_* environment variables.
#Prerequisites
- Install the Azure CLI.
- Run
az loginand select the subscription you want Crabbox to use.
#Usage
# Use the active az CLI subscription and default location (eastus):
crabbox azure login
# Pick a specific subscription:
crabbox azure login --subscription 00000000-0000-0000-0000-000000000000
# Pick a specific location:
crabbox azure login --location westus2
# JSON output:
crabbox azure login --json
After login succeeds, crabbox warmup --provider azure and crabbox run --provider azure work immediately.
#Flags
--subscription <id|name> Azure subscription ID or name (default: active az CLI subscription)
--location <location> Azure location for provisioning (default: eastus)
--json Print JSON output
#What it does
- Runs
az account showto detect the active subscription ID, tenant ID, - Validates that
DefaultAzureCredentialcan acquire a token for Azure - Writes
azure.subscriptionId,azure.tenantId, andazure.location - Sets
provider: azureif no default provider is configured.
and subscription name.
Resource Manager.
to the user config file (e.g. ~/.config/crabbox/config.yaml).
#Auto-resolve
Even without running crabbox azure login, if the user config or environment does not contain a subscription ID, Crabbox will attempt to detect it from az account show at runtime. This makes az login + crabbox warmup --provider azure work with zero configuration, though crabbox azure login is recommended for a persistent setup.
Related docs: