Finance asked you for a PaaS spend forecast in January. You sent a spreadsheet. Nobody opened it again until October, when the year ran 22% over budget and the post-mortem turned into an argument about whose number was wrong. The answer was nobody’s — the forecast was reasonable in January, the workload changed in March, and nobody noticed because there was no monthly comparison. The fix is not a better forecast. The fix is a monthly variance report that catches drift in the third month, not the tenth.
What’s happening
A cost forecast is a hypothesis about future consumption. An actual is what the platform billed. The variance between them — actual - forecast, expressed as a percentage of forecast — is the signal. Variance has three meaningful states:
- Variance within ±5%. The forecast is tracking. Continue.
- Variance between ±5% and ±15%. Investigation. Something changed; understand whether it’s a one-off, a trend, or a measurement error.
- Variance beyond ±15%. Re-forecast. The original assumption is no longer reliable.
What kills variance reports in practice:
- Reports nobody runs. A spreadsheet that requires manual updates every month is a spreadsheet that gets updated three times and abandoned. The report has to be one command.
- Forecasts in the wrong unit. Forecasting in dollars when the platform bills in cloudlet-hours means every cloudlet-rate change disguises itself as a forecast error. Forecast in cloudlet-hours and storage-GB-months. Convert to currency at the end.
- Variance without attribution. Knowing the bill is 18% over doesn’t help if you can’t say which environment caused it. Variance reports must roll up by tag (team, customer, product) — see also the article on billing tags.
- No corrective loop. A variance report that’s filed and forgotten is the same as no report. The format must end with “what we’ll do about it next month.”
The goal is not a perfect forecast. The goal is a feedback loop that closes the gap between intent and reality within one to two months of the divergence.
How to verify
Pull last month’s actual usage in cloudlet-hours and storage-GB-months, compare to the forecast for the same period, and look at the variance per environment grouping.
# 1. Forecast file - simple YAML/CSV maintained by ops
cat /etc/sh/forecast-2026.csv
# month,group,cloudlet_hours,storage_gb_months
# 2026-04,team:platform,7200,500
# 2026-04,team:data,4500,2400
# 2026-04,team:frontend,3000,200
# 2. Pull actual cloudlet-hours per environment for the last billing month
START=$(date -d 'last month' +%Y-%m-01)
END=$(date +%Y-%m-01)
START_MS=$(date -d "$START" +%s)000
END_MS=$(date -d "$END" +%s)000
curl -s "https://app.paas.example/1.0/billing/account/GetExternalBillingHistoryByPeriod?session=$SESSION&starttime=$START_MS&endtime=$END_MS" \
| jq -r '.array[] | [.envName, .cloudletsHours, .storageGB] | @tsv' > actual.tsv
# 3. Join environment names to their team tag
curl -s "https://app.paas.example/1.0/environment/control/GetEnvs?session=$SESSION" \
| jq -r '.infos[] | [.env.shortdomain, (.env.tags[]? | select(startswith("team:")))] | @tsv' \
> env-team-map.tsv
# 4. Roll up actuals by team
join -t$'\t' -1 1 -2 1 \
<(sort actual.tsv) \
<(sort env-team-map.tsv) \
| awk -F'\t' '{team=$4; ch[team]+=$2; sg[team]+=$3} END {for (t in ch) printf "%s\t%d\t%d\n", t, ch[t], sg[t]}' \
| sort > actual-by-team.tsv
# 5. Compute variance vs forecast
awk -F'\t' -v month="$(date -d 'last month' +%Y-%m)" '
NR==FNR && $1==month {fc[$2]=$3; fs[$2]=$4; next}
NR!=FNR {
team=$1
if (team in fc) {
cv = ($2 - fc[team]) / fc[team] * 100
sv = ($3 - fs[team]) / fs[team] * 100
printf "%-30s cloudlet-hrs: forecast=%6d actual=%6d variance=%+6.1f%% storage-GB: forecast=%5d actual=%5d variance=%+6.1f%%\n", team, fc[team], $2, cv, fs[team], $3, sv
}
}
' /etc/sh/forecast-2026.csv actual-by-team.tsv
Sample output:
team:platform cloudlet-hrs: forecast= 7200 actual= 7350 variance= +2.1% storage-GB: forecast= 500 actual= 510 variance= +2.0%
team:data cloudlet-hrs: forecast= 4500 actual= 6100 variance= +35.6% storage-GB: forecast= 2400 actual= 3200 variance= +33.3%
team:frontend cloudlet-hrs: forecast= 3000 actual= 2850 variance= -5.0% storage-GB: forecast= 200 actual= 195 variance= -2.5%
The data row is the signal. 35% over on both compute and storage is not noise — investigate what changed.
The fix
The monthly variance loop we run:
-
Forecast in units, not currency. Maintain
forecast-YYYY.csvwith cloudlet-hours and storage-GB-months per team (or per customer, or per product — whichever rolls up cleanly with your tag taxonomy). Update once per year, then re-forecast on any month with >15% variance. -
Run the report on the 5th of each month. The previous billing month is closed by then on most platforms. Run the script unattended via cron, write the output to a versioned file, and email it.
# /etc/cron.d/variance-report
0 9 5 * * root /opt/sh/variance-report.sh | tee /var/log/sh/variance-$(date +%Y-%m).log | mail -s "PaaS variance - $(date -d 'last month' +%B)" platform@example.com finance@example.com
- Attribute the variance, don’t just report it. For any team with >5% variance, walk the environments. Compare last month’s per-env cloudlet-hours to the prior month. Identify the top 3 movers.
# Find the top variance drivers within a team
TEAM="data"
PRIOR=$(date -d '2 months ago' +%Y-%m)
CURRENT=$(date -d 'last month' +%Y-%m)
paste <(grep "$TEAM" actual-prior.tsv | sort) \
<(grep "$TEAM" actual-current.tsv | sort) \
| awk -F'\t' '{delta=$5-$2; printf "%-25s prior=%6d current=%6d delta=%+6d\n", $1, $2, $5, delta}' \
| sort -k7 -rn | head -3
-
Write the corrective action. Every report ends with a section “actions for next month.” Examples: “right-size
data-warehouse-prodfrom 16 to 12 reserved cloudlets”, “auditanalytics-jobs-stagingshutdown policy”, “verify storage growth ondata-lake-prodagainst retention policy.” If the report has no actions, you’re not reading it carefully enough. -
Re-forecast at >15% variance for two consecutive months. A single month of 22% variance might be a release. Two months in a row is a new baseline. Update
forecast-YYYY.csvfor the remaining months and note the change in the report archive. -
Annual review. At year-end, plot actual vs forecast for all 12 months. Where the forecast was off systematically — same direction, same team — investigate the forecasting assumption. Forecasts that are always 10% low aren’t conservative; they’re useless for budgeting.
The cultural piece: the variance report goes to finance AND to engineering, in the same email, every month. The two sides see the same number. There is no “their forecast” vs “our actual.” That alignment is what makes the loop close, more than the script itself.
We operate cost-variance loops as part of environment management on managed PaaS — monthly variance reports, attribution to environments, re-forecasting discipline, annual review. If your forecast and your bill haven’t been compared since January, start a FinOps review.