Architect: use it

Cost and budgets

What each resource is estimated to cost a month, added up by environment, repository, and task, in the currency you pick, with a budget per environment and a cost limit per plan.

Every resource on the map shows an estimated monthly cost, and the board adds them up by environment, by repository, and by the task that owns a short-lived environment. Infrastructure shows each environment’s month and its trend; an environment’s page shows each resource’s.

#How it estimates

#In your currency

Estimates are kept in the provider’s currency, US dollars on Cloudflare, and shown in the one you set for the whole board, in Settings, under Currency, at a rate you set and change when you like: “At 1 USD = 0.92 EUR, set 3 Oct.”

Fetch today’s rate fills the field from Frankfurter’s public rates, only when you press it, and sends only the currency pair. You still save it. Until you set a currency, amounts are in US dollars.

A plan keeps the rate it was checked at, since the policy compared its cost then. A cost no rate covers is unknown, so the cost and budget guards ask you.

#Budgets and the cost limit

Both are in the policy, in your currency:

What it isDefaultWhat happens
Cost limit (costLimit)The most one plan may add to an environment’s monthly cost5 a monthA plan over it, or whose cost isn’t known, waits for you
Budget (budget)What one environment may cost a month20 a monthA plan that takes the environment over it waits for you; near it and over it, a signal

Set one per environment under environments, like "production": { "budget": 200 }.

The first time a month goes near (80%) or over an environment’s budget, the board records one cost signal: a warning when near, critical when over, which opens an incident that says it’s a budget. Coming back inside sends nothing, and a new month starts again. A routine can start on budget.crossed at any percent you pick (Signals, incidents, and runbooks).

An envelope can have a cost bound too: a scale that would take the environment past it waits for you.

#From the terminal

npx breakaway infra show production    # each resource with its estimated cost
npx breakaway infra plan plan-2        # what one plan adds or saves