MCMMCM DocsEngineering (Internal)
User StoriesMCM-42 — Pre-Provisioning Cost Estimation
v1.2 is unreleased — see v1.1 for the current stable release.

MCM-43 — Estimated Cost Before Applying a Workspace Plan

A Platform Engineer sees an estimated cost for a workspace's planned infrastructure changes before applying them.

MCM-43 — Estimated Cost Before Applying a Workspace Plan

← Back to Pre-Provisioning Cost Estimation overview

As a Platform Engineer,
I want to see an estimated cost for a workspace's planned infrastructure changes,
so that I can judge the financial impact of a change before I apply it, not after.

Acceptance Criteria

  • When a plan finishes running for a workspace, its result includes an estimated cost for each resource being added or replaced, and a total estimated cost for the whole plan — shown on the same screen as the existing added/changed/destroyed resource summary, before Apply is available.
  • The estimate reflects each planned resource's specific configuration (e.g. instance size, disk size and type, region) using on-demand list pricing, not a flat per-resource-type average.
  • Resources being destroyed are shown as removed cost, and resources being replaced are shown as their net cost delta (the new resource's cost minus the old resource's cost being removed) — neither is treated as a plain addition.
  • The total is shown in the organization's configured currency, converted from the source list price using the platform's existing currency conversion.
  • A resource type with no matching price in the pricing catalogue is clearly marked "cost not available" on that resource, rather than shown as zero or silently left out of the total.
  • If the pricing catalogue's most recent refresh is overdue (its periodic sync has failed or fallen behind), the estimate is shown with a clear "may be out of date" warning rather than presented as current.
  • A single workspace's plan can mix AWS and Azure resources, and the estimate covers both within one total.
  • The estimated cost is expressed as a projected monthly figure (on-demand list price extrapolated to a full month), consistent with how cost is presented elsewhere in the platform.
  • The estimate is informational only — Apply is never blocked or gated by the estimated cost, regardless of how large it is or how much pricing coverage is missing.

Technical Design

When a workspace's plan finishes running, the same plan output already used for the existing pre-apply change preview is passed to a self-hosted, open-source pricing engine (Infracost's Cloud Pricing API, run entirely in-house with no external account or fee) that matches each planned resource's configuration to the relevant AWS or Azure on-demand list price, drawn from a catalogue it keeps current via a scheduled weekly sync against each provider's own public pricing data. The resulting per-resource and total figures are converted into the organization's configured currency using the platform's existing currency conversion capability, then attached to the plan result the Platform Engineer already reviews before Apply. An unpriced resource type is passed through as-is rather than estimated at zero, and a stale price catalogue is surfaced as a warning rather than presented as current.


UI / Frontend Changes

  • Workspace plan review screen: new "Estimated Cost" panel alongside the existing added/changed/destroyed resource summary, showing the total and a per-resource breakdown.
  • Each resource row in the plan diff shows its individual estimated cost (or a "cost not available" label) next to its existing change-type indicator.
  • A visible warning state when the underlying price data is stale.
  • Loading state for the cost estimate that matches the existing "plan pending" state, since both come back together when the plan completes.
  • No change to the Apply button's availability or behavior — the estimate is purely additive to the existing review screen.

On this page