# Build brief — a focused alternative to Infracost Cloud

> **Verdict:** Partly, if you narrow it · **Buildability:** 53/100 · **Category:** Dev Tools
> **Source:** https://www.canitbevibecoded.com/infracost-cloud
> Independent editorial assessment from Can It Be Vibe Coded? Not affiliated with, endorsed by, or derived from Infracost Cloud. Verify current pricing and capabilities before acting.

## Context

**Infracost Cloud** — Put cloud cost diffs and FinOps checks into infrastructure pull requests. It currently costs $1,000/mo.

The core developer loop is a credible focused build if the replacement is intentionally narrow: one GitHub App, Terraform on AWS, a small resource catalog, public list prices, basic tag and cost guardrails, and one idempotent pull-request comment. A faithful Infracost Cloud replacement is much harder because the paid product combines broad IaC and multi-cloud coverage with continuously maintained pricing data, policy depth, custom price books, organization-wide visibility, workflows, and enterprise integrations.

This brief describes a focused, single-operator replacement for the part of Infracost Cloud that is genuinely reproducible. It is deliberately narrower than the product it replaces, and it says so in writing. Build the useful core; do not pretend to have rebuilt the rest.

## What you are building

Watch Terraform pull requests, estimate the AWS monthly cost delta for a bounded resource set, run basic FinOps checks, and update one GitHub pull-request comment.

- Build the focused developer workflow you use repeatedly, with local configuration.
- A responsive interface with real empty, loading, success, and error states.

## Requirements

### Functional

- Docker with persistent storage for SQLite.
- Internet access to GitHub and the public AWS Price List files.

### Data and integrations

- GitHub App credentials and a public HTTPS webhook endpoint.

Each of these needs a real account, credential, or quota. Set them up before writing feature code.

### Non-functional

- Accessibility: semantic markup, labelled controls, visible focus, and reduced-motion support.
- Security: server-side secrets, validated input, and no credentials in the client bundle.
- Reliability: retries with backoff on external calls, and a clear failure state when a provider is down.
- Portability: the operator can export their data and leave without losing it.

## Implementation brief

Build a self-hosted GitHub App called CostLens in an empty repository.
Use Python 3.12, FastAPI, SQLite, python-hcl2, httpx, PyJWT, and Docker Compose; do not offer alternative stacks.
The core loop is: when a pull request changes Terraform, estimate the AWS monthly cost delta, run basic FinOps checks, and update one PR comment.
Authenticate as a GitHub App using an app ID, installation token flow, webhook secret, and private key stored outside the repository.
Handle pull_request opened, synchronize, and reopened events, and verify every webhook signature before processing.
Analyze the base commit and head commit separately so the comment shows previous cost, proposed cost, and monthly delta.
Parse Terraform HCL locally and support a deliberately bounded first set: EC2 Linux on-demand instances, EBS gp2/gp3 volumes, and RDS on-demand instances plus allocated storage.
Use the public AWS Price List Bulk files as the pricing source, cache downloaded price data, and record the source publication timestamp.
Assume 730 hours per month for hourly resources and show every assumption in the result.
Never price an unsupported or ambiguous resource as zero; list it as unsupported and exclude it from totals.
Support count when it resolves to a literal integer; mark for_each, unknown expressions, modules, and unresolved variables as unsupported in v1.
Add configurable required-tag checks and a configurable monthly cost-increase warning threshold.
Post a Markdown PR comment with total before, total after, delta, the five largest increases, policy warnings, unsupported resources, and pricing timestamp.
Use a hidden HTML marker so repeated webhook deliveries update the existing comment instead of creating duplicates.
Store repository settings and analysis history in SQLite, with a small admin page for recent PR analyses and configuration.
Add retry and timeout handling for GitHub and AWS pricing downloads, structured logs, and a health endpoint.
Ship .env.example, a Dockerfile, docker-compose.yml, database migrations, and one-command local startup.
Include unit tests for pricing normalization and Terraform resource extraction plus one end-to-end webhook happy path using fixtures.
Document the minimum GitHub App permissions and events in the README, including pull requests read, contents read, and issues write.
Do not send Terraform source, secrets, or repository contents to any AI or third-party analysis API.
Deliberately leave out Azure, GCP, Terragrunt, CloudFormation, CDK, negotiated discounts, Savings Plans, Reserved Instances, and usage-based cost forecasting.
Deliberately leave out SSO, billing, organization dashboards, campaigns, AutoFix, enterprise RBAC, and GitLab or Azure DevOps integrations.
Finish by running the tests, starting the stack locally, processing the included sample webhook, and listing the exact commands used.

## Delivery standard

- Inspect the repository first, then write a short implementation plan before writing code.
- Deliver the smallest complete end-to-end workflow first; every primary control must work against persisted data.
- Use real validation and storage; never substitute fake dashboards, decorative controls, hard-coded success states, or mock integrations.
- Include responsive layouts plus genuine empty, loading, success, validation, and failure states.
- Keep secrets server-side in environment variables, provide .env.example, and never commit credentials or user data.
- Add structured logs around every external call and return actionable errors without leaking sensitive details.
- Write unit tests for the core logic and one automated test of the main user journey.
- Finish with a README covering setup, architecture, data location, backups, tests, deployment, and known limitations.

## Acceptance criteria

- [ ] A clean install starts the app using only the README and .env.example.
- [ ] The primary journey works from first visit through saved result, reload, edit, export, and deletion where applicable.
- [ ] Invalid input, missing configuration, provider failure, and an empty database each have a usable state.
- [ ] The interface works at 390px and 1440px, is keyboard navigable, and shows visible focus on every control.
- [ ] Tests, type checking, linting, and a production build all pass with no ignored failures.
- [ ] No part of the interface implies a live integration, security guarantee, or scale capability that was not actually built and verified.

## Non-goals

Do not build these, and do not claim to have replaced them:

- AWS, Azure, and Google Cloud coverage across the full Infracost resource catalog.
- Terragrunt, CloudFormation, AWS CDK, modules, and complex Terraform expression coverage.
- Custom price books, negotiated discounts, and organization-specific pricing.
- Issue Explorer, campaigns, AutoFix, dashboards, audit trails, and team workflows.
- Enterprise identity, security, support, and broad CI/CD integrations.

## What you still own after launch

- Run migrations, backups, restores, and dependency updates.
- Test the critical journey after every model, API, or hosting change.
- Monitor failures and fix the edge cases a first prompt will miss.
- Maintain every third-party integration as APIs and OAuth rules change.

## Risk

**Operational risk.** The code is achievable; dependable data, integrations, and ongoing operations are the real cost.

Editorial confidence in this assessment: medium. No reviewed project implementation is linked yet.

## Prior art

Working open-source software you can read, fork, or borrow from before starting:

- [Infracost](https://github.com/infracost/infracost) — Apache-2.0 developer toolkit and the clearest reference for the product's resource-to-cost model and pull-request workflow
- [AWS Price List](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/using-the-aws-price-list-bulk-api.html) — AWS-maintained bulk pricing data that a narrow replacement can consume without depending on Infracost's pricing API

---

Generated by [Can It Be Vibe Coded?](https://www.canitbevibecoded.com) · Full report: https://www.canitbevibecoded.com/infracost-cloud
