Azure Setup
Cost Exports

Cost Exports

Verdaro ingests cost data from Azure Cost Management exports stored in Blob Storage.

Create a Storage Account

az storage account create \
  --name "verdarocostexports" \
  --resource-group "YourResourceGroup" \
  --location "eastus2" \
  --sku Standard_LRS \
  --kind StorageV2

Create a Container

STORAGE_KEY=$(az storage account keys list \
  --account-name "verdarocostexports" \
  --resource-group "YourResourceGroup" \
  --query "[0].value" -o tsv)
 
az storage container create \
  --name "cost-exports" \
  --account-name "verdarocostexports" \
  --account-key "$STORAGE_KEY"

Required Datasets

Verdaro requires three distinct datasets to provide full FinOps capabilities. While FOCUS is the primary driver, Actual and Amortized details are used for reconciliation and specific commitment analysis.

  1. FOCUS (Cost and usage - FOCUS): The primary engine for cost analysis.
  2. Actual Cost (Cost and usage details (actual)): Used for invoice reconciliation.
  3. Amortized Cost (Cost and usage details (amortized)): Essential for tracking Reservation and Savings Plan utilization.

For detailed configuration of each, see Microsoft: Tutorial - Create and manage exported data (opens in a new tab).

Expected Storage Layout

Verdaro expects each export to follow the standard Azure "Partitioned" layout within your container:

{exportName}/{runId}/{fileName}.csv.gz

If you use a Directory Path in your export configuration, the layout becomes:

{directoryPath}/{exportName}/{runId}/{fileName}.csv.gz

Verdaro automatically discovers the latest run by inspecting the runId (which includes a timestamp) and reconciles multiple parts if the export is sharded by Azure.

Configure Cost Management Export

Portal

  1. Go to Cost ManagementExports.
  2. Click Create and fill:
    • Export name: daily-costs-focus
    • Export type: Cost analysis
    • Recurrence: Daily
    • Storage account: your storage account
    • Container: your container
    • Format: FOCUS (preferred)

Azure CLI

az costmanagement export create \
  --name "daily-costs-focus" \
  --scope "/subscriptions/{SUBSCRIPTION_ID}" \
  --storage-account-id "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageAccounts/{ACCOUNT_NAME}" \
  --storage-container "cost-exports" \
  --storage-path "focus" \
  --timeframe "MonthToDate" \
  --recurrence "Daily" \
  --type "AmortizedCost" \
  --format "Focus"

If FOCUS isn’t available in your region, use Csv for --format and keep the rest of the settings the same.

Seeding Historical Exports

Verdaro's backfill relies on existing historical files in your storage account. Since Azure exports are not retroactive, you must manually trigger ("seed") previous months to populate the 13-month history.

Procedure

  1. Identify the months missing from your 13-month lookback.
  2. Trigger a manual run for each of the three required datasets (FOCUS, Actual, Amortized).

CLI Example

To seed a specific month (e.g., January 2025), use the following command for each dataset:

# Replace {EXPORT_NAME} with daily-costs-focus, daily-costs-actual, or daily-costs-amortized
az costmanagement export run \
  --name "{EXPORT_NAME}" \
  --scope "/subscriptions/{SUBSCRIPTION_ID}"

Automation Script (Bash)

For seeding multiple months, you can use a loop:

#!/bin/bash
SUBSCRIPTION_ID="{SUBSCRIPTION_ID}"
EXPORTS=("daily-costs-focus" "daily-costs-actual" "daily-costs-amortized")
 
for export in "${EXPORTS[@]}"; do
  echo "Seeding $export..."
  az costmanagement export run --name "$export" --scope "/subscriptions/$SUBSCRIPTION_ID"
done

Note: Azure allows you to trigger historical runs for the last 13 months. If you need data older than that, you must use the Exports API (opens in a new tab) directly with a custom timeframe.