Cloud Cost Calculator (VS Code Extension)
Real-time cloud infrastructure cost estimates for IaC files (Terraform, CloudFormation). Bring your own prices (JSON/YAML). Inline hints, CodeLens, status bar, and a side panel breakdown.
Features
- Price config:
.cloudcost/prices.json
or .yaml
(workspace) and ~/.cloudcost/prices.json
(global)
- Terraform (
.tf
, .tf.json
) and CloudFormation (YAML/JSON) parsing
- Inline monthly costs, detailed CodeLens, status bar total
- Side panel with totals and per-category breakdown
- Export cost report (JSON)
- Environments and overlays:
cloudcost.environment
and cloudcost.files.additionalPriceConfigs
- 3-day trial, one-time license (€9) for perpetual use
Quick Start
- Create a price file in your workspace, e.g.
.cloudcost/prices.json
(see below).
- Open a Terraform/CloudFormation file; inline hints appear.
- Use the Command Palette (Ctrl+Shift+P):
- Cloud Cost: Calculate Total
- Cloud Cost: Toggle Display
- Cloud Cost: Show Cost Breakdown
- Cloud Cost: Export Cost Report
- Cloud Cost: Enter License Key / Purchase Info
Example prices.json
:
{
"version": "1.0",
"currency": "USD",
"provider": "AWS",
"region": "us-east-1",
"resources": {
"compute": { "t3.micro": { "hourly": 0.0104, "monthly": 7.488 } },
"storage": { "gp3": { "per_gb_monthly": 0.08 } }
}
}
- version: string (config version)
- currency: string (e.g., USD)
- provider: string (e.g., AWS)
- region: string (e.g., us-east-1)
- resources: map of categories, each a map of SKUs with price entries
- compute: { "": { hourly?, monthly?, yearly? } }
- database: { "": { hourly?, monthly? } }
- storage: { "": { per_gb_monthly?, iops?, throughput? } }
- network: { "": { hourly?, monthly?, per_gb_processed? } }
Example (YAML):
version: "1.0"
currency: USD
provider: AWS
region: us-east-1
resources:
compute:
t3.small:
hourly: 0.0208
monthly: 14.976
storage:
gp3:
per_gb_monthly: 0.08
Settings
cloudcost.display.format
: minimal | detailed | breakdown
cloudcost.display.colorThresholds
: low/medium/high monthly thresholds
cloudcost.calculation.hoursPerMonth
: default 730
cloudcost.files.priceConfig
: default .cloudcost/prices.json
cloudcost.files.additionalPriceConfigs
: array of overlay files
cloudcost.environment
: default | dev | staging | prod
Licensing
- Trial: 3 days from first activation.
- One-time price: €9 for a perpetual license.
- Purchase: run “Cloud Cost: Purchase Info” (email
vahmoh111@gmail.com
, PayPal accepted). You’ll receive a license key.
- Enter key: run “Cloud Cost: Enter License Key”.
Perpetual key format is a single hash string issued by the author.
Test Workspace
Use the included test-environment
folder containing sample IaC files and ready-to-use price configs.
Screenshots


CLI
Run the CLI to generate a cost report:
npx cloudcost ./test-environment ./test-environment/.cloudcost/prices.json
Changelog
See CHANGELOG.md
.