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.
Bare-metal servers give you a whole physical machine with no hypervisor overhead; cloud VMs slice physical hosts into virtual instances. For steady, resource-hungry workloads bare metal can be cheaper per unit, but VMs win on flexibility. Here is the comparison with numbers.
A cloud GPU costs a few dollars an hour with no commitment; buying the same card costs thousands upfront but nothing per hour after. The crossover is utilization, and for heavy steady GPU work owning can pay back in months. Here is the math.
EKS and GKE both charge a control-plane fee and node compute, but their pricing details, autopilot options, and free-tier treatment differ enough to matter. Which cloud is cheaper for Kubernetes depends on cluster count and how you run nodes. Here is the comparison.
Windows Server and SQL Server licensing can dominate the cost of a Windows workload, and Azure's Hybrid Benefit lets you reuse existing licenses in ways that change the math versus AWS. Which cloud is cheaper depends on the licenses you already own. Here is the comparison.
Scaling up means fewer, larger instances; scaling out means many smaller ones. The per-vCPU price is often similar, but overhead, granularity, and resilience differ enough to change the total. Here is when each is cheaper, with numbers.
Serving files straight from S3 or a load balancer charges full egress rates on every byte; a CDN caches content at the edge, cutting origin egress and often charging less per GB. The break-even depends on cache hit ratio and traffic. Here is the math.
Serverless functions cost nothing when idle and scale to zero, but their per-request price is high; a VM costs a flat hourly rate no matter the load. There is a clear crossover in request volume where a VM becomes cheaper. Here is how to find it.
Snowflake and Databricks both bill by consumption but structure it differently: Snowflake charges per second of warehouse time in credits, Databricks charges DBUs on top of the cloud compute you run. Which is cheaper depends on workload type. Here is the comparison.
Single-tenant gives each customer their own isolated stack; multi-tenant packs many customers onto shared infrastructure. Isolation costs more per customer but simplifies some things; sharing amortizes cost but adds complexity. Here is the cost comparison for SaaS architects.
A monolith runs as one deployable with shared infrastructure; microservices split it into many services, each with its own baseline overhead. That per-service overhead multiplies, and it is the biggest infrastructure cost difference. Here is the comparison with numbers.
Serverless databases scale capacity automatically and bill per use, costing nothing when idle; provisioned databases reserve fixed capacity at a flat rate. The crossover is utilization, and it decides which is cheaper. Here is the math with numbers.
Shift-left cost estimation moves the cost conversation from the monthly invoice to the pull request, where a change is still cheap to fix. Here is how to wire it into a Terraform workflow so reviewers see the dollars before merge.
A cost diff shows how much a pull request adds to or removes from your monthly bill, not just the total. Here is why the delta matters more than the absolute number, and how to compute and present it in CI.
A cost gate fails a pull request when its estimated cost crosses a threshold, turning a budget into an automated check. Here is how to design gates that stop expensive changes without blocking everyday work.
Reusable Terraform modules hide their cost behind clean interfaces, so a single module call can provision an expensive stack. Here is how to estimate module cost and expose it so callers know what they are deploying.
Open Policy Agent lets you express cost rules as Rego policies evaluated against a priced Terraform plan, so a budget becomes a versioned, testable rule. Here is how to combine a cost estimate with OPA to enforce cost policy.
Spreading infrastructure across many cloud accounts improves isolation but scatters cost. Here is how to keep cost visible at the pull request level when your Terraform provisions across dozens of accounts.
Terraform workspaces let one configuration provision multiple environments, but each workspace carries a different cost depending on its variables. Here is how to track cost per workspace so dev, staging, and prod stay honest.
Ephemeral environments spun up per pull request accelerate testing but multiply cost, since each one provisions real infrastructure. Here is how to estimate and control the cost of preview environments before they proliferate.
Configuration drift, where deployed infrastructure no longer matches your Terraform, has a cost dimension: manual changes can add resources your code never priced. Here is how drift and cost intersect and how to catch it.
Cost allocation depends on consistent tags, and the most reliable way to get them is to enforce tagging in Terraform itself. Here is how to apply, standardize, and validate cost-allocation tags through your IaC.
The classic three-tier architecture, web, application, and database, has a predictable cost shape once you know which tier dominates. Here is a breakdown of where spend concentrates and how to estimate it from Terraform.
Event-driven architectures trade steady servers for pay-per-event components like queues, functions, and streams, which changes the cost shape entirely. Here is where event-driven spend concentrates and how to estimate it.
A data pipeline spans ingestion, processing, and storage, and cost can concentrate in any stage depending on data volume and processing intensity. Here is how to break down pipeline cost and estimate it from Terraform.