Skip to content

Azure

Clanker supports querying Azure infrastructure using the az CLI. Queries are routed to Azure by an explicit flag or by automatic keyword detection.


Authentication

Azure authentication uses the az CLI login flow.

Setting up authentication

bash
# Interactive login
az login

# Set default subscription
az account set --subscription your-subscription-id

# Verify
az account show

Configuration

Add your Azure subscription ID to ~/.clanker.yaml:

yaml
infra:
  azure:
    subscription_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Subscription ID resolution order

  1. --azure-subscription CLI flag
  2. infra.azure.subscription_id in the config file
  3. AZURE_SUBSCRIPTION_ID environment variable
  4. AZ_SUBSCRIPTION_ID environment variable

Querying Azure

Explicit flag

bash
clanker ask --azure "What virtual machines are running?"

Automatic routing

If your question mentions Azure-specific services, Clanker routes to Azure automatically:

bash
clanker ask "List all Azure Container Apps"

Supported Services

Clanker queries Azure services through the az CLI. Commonly queried services include:

  • Virtual Machines
  • Azure Kubernetes Service (AKS)
  • Container Apps
  • App Service
  • Azure SQL
  • Blob Storage
  • Virtual Networks
  • Load Balancers
  • Azure Functions
  • Key Vault

Maker Pipeline

The maker feature supports Azure infrastructure provisioning:

bash
# Generate a plan
clanker ask --maker --azure "Create a resource group called my-rg in eastus"

# Apply the plan
clanker ask --apply --plan-file plan.json --azure-subscription your-sub-id

Azure maker plans require the subscription ID during both generation and execution.


Backend Credentials

For team environments, Azure service principal credentials can be stored and retrieved through the Clanker backend:

bash
clanker credentials store azure
clanker ask --api-key ck_live_abc123 --azure "What VMs are running?"

When backend credentials include a service principal (tenant ID, client ID, client secret), Clanker performs an az login --service-principal before executing queries.