Notes from the team building C3X. Cost estimation for Terraform, the economics of cloud infrastructure, and how to ship FinOps tooling without a SaaS gate.
Encode cost rules, budget thresholds, per-PR deltas, required tags, banned SKUs, as machine-enforced policies in CI against a cost estimate. Here's the policy set worth having and how to roll it out.
Don't estimate a whole monorepo on every PR. Detect changed stacks, estimate only those in a CI matrix, and aggregate. Here's the pattern that keeps CI fast and attributes cost to the right stack.
Compute and storage have converged, but data transfer hasn't. Here's the shared structure (ingress free, egress tiered, cross-region charged), where AWS/Azure/GCP diverge, and the universal levers to cut it.
Compute Savings Plans give ~66% off across families and Fargate/Lambda; EC2 Instance Savings Plans give ~72% locked to one family/region. Here's which to pick and how they differ from Reserved Instances.
Azure egress is free for the first 100 GB/month, then tiered ~$0.087/GB; ingress is free. Here's the egress map, the patterns that drive the bill, and how a CDN and region co-location cut it.
Bigtable bills nodes (~$474/month each, minimum one) + storage. The node floor makes it expensive below scale. Here's how to tune nodes, SSD vs HDD, and when a cheaper datastore wins.
Custom metrics are $0.30/metric/month, but each metric-name + dimension-value combination is a separate billable metric, so high cardinality explodes the bill. Here's how to control it.
Delete waste, right-size, commit the baseline, use Spot, tier storage, cut egress, then keep it down with a cost gate. A practical, impact-ordered checklist with links to the details for each step.
Startups need budget alerts, basic tagging, and cost in the PR, not a FinOps team. Here's the starter kit, when to buy commitments, the common traps, and why not to over-engineer it.
FSx has four file system types, each billing storage plus throughput. Here's what Lustre, Windows File Server, NetApp ONTAP, and OpenZFS cost, which to use, and how to avoid over-provisioning throughput.
Load Balancer (L4) is ~$25-40/month; Application Gateway (L7) starts ~$180/month plus capacity units. Here's what the gap buys, when you need L7, and how to avoid defaulting to the pricier option.
GCP load balancers bill forwarding rules (~$18/month each for the first five) plus data processed. Here's why sprawl drives the bill and how URL maps and a CDN cut it.
DynamoDB cost is throughput + storage + GSIs + extras. Here's how to cut it: match capacity mode to traffic, prune unused indexes, set TTL, and use Standard-IA for cold tables.
Comparable compute and storage sit in a narrow band across the three clouds. The real differences are egress, the discounts you'll commit to, and managed services. Here's how to compare apples-to-apples.
The cloud bills nodes; teams consume pods. Here's how to allocate cluster cost by requests or usage, handle shared and idle costs, and where OpenCost/Kubecost and pre-deploy estimation each fit.
Add a pre-commit hook that estimates Terraform cost on every commit and blocks over-budget changes. Runs in seconds, works offline, and pairs with a CI gate that can't be skipped.
Log Analytics bills ~$2.30/GB ingested, the bill is driven by volume, not retention. Here's how to cut it with source filtering, Basic Logs, commitment tiers, and Container Insights tuning.
S3 (~$0.023/GB) is cheapest, EBS (~$0.08) middle, EFS (~$0.30) priciest, but they're not interchangeable. Here's how to match the service to the access pattern and avoid paying 13x by using EFS where S3 would do.
Azure Spot VMs run up to ~90% below pay-as-you-go, evictable with 30 seconds' notice. Here's the eviction model, what workloads fit, AKS Spot pools, and how to design for interruption.
Autopilot bills pod resource requests (~$0.0445/vCPU-hour), not nodes, so oversized requests are the overspend. Here's how to right-size requests, use Spot Pods, and pick compute classes.
VNet peering has no hourly fee but charges ~$0.01/GB each direction (more for global). It bills on both sides. Here's where the cost hides in hub-and-spoke and chatty services, and how to cut it.
Management events' first copy is free; data events ($0.10/100k) on busy S3/Lambda can hit thousands per month. Here's the cost layers and how to scope data events so CloudTrail stays cheap.
Terragrunt's module composition breaks naive cost tools. Here's how to estimate a Terragrunt stack by resolving its dependency graph, run it in CI, and gate PRs on a budget, no apply required.
Add a GitLab CI job that estimates Terraform cost on every merge request, posts the number as an MR note, and fails the pipeline over budget. Works on self-hosted and air-gapped GitLab. No apply needed.