I Was About to Run terraform apply - Then I Saw the Price Tag
Just Another Infra Change - Or So I Thought I was working on a small update to the infrastructure. We needed to scale out a couple of services—specifically, adding extra capacity to our web servers and database tier. So, I had to add two EC2 instances of type m5.large and resize an existing EBS volume from 100GB to 250GB for more storage. Simple stuff—just another change to keep things running smoothly within the infra. I quickly wrote the Terraform config, added the new instances and the resized EBS volume, and ran terraform plan. The output looked good—two new EC2 instances and a larger storage volume. Nothing unexpected, everything was as it should be. I was about to hit terraform apply and move on with my day. Then I stopped for a second. Something felt off. I’ve been through this before—what seems like a small change can easily end up costing a lot more than expected. In the past, I’ve had EC2 instances running at m5.xlarge when t3.medium would have been enough, costing $100/month instead of $40. I’ve also spun up additional NAT Gateways without fully considering the implications. Those small, overlooked things can quickly add up. I wasn’t about to make that mistake again. So I thought, “Let me check the price before I apply this.” Better safe than sorry. This Tool Helped Me Dodge a Big Bill What I needed was a way to check the cost of my changes directly in the terminal—without logging into any UI or cloud dashboard. I wanted to get the cost estimate as part of my workflow, right alongside running terraform plan, so I could catch any surprises before actually deploying. I did some quick research, just scrolling through Reddit, LinkedIn, and Twitter for about 20 minutes, looking for a tool that could do exactly that. After a bit of digging, I found OpenInfraQuote. It seemed to check all the boxes: a command-line tool that would pull in your terraform plan, match it with AWS pricing, and give you an estimate without leaving your terminal. Curious to try it out, I gave it a shot. Here’s how it worked: I ran the standard Terraform plan: terraform plan -out=tf.plan Then, I converted the plan into JSON format: terraform show -json tf.plan > tfplan.json Finally, I used OpenInfraQuote with the pricing sheet: oiq match --pricesheet prices.csv tfplan.json | oiq price --region us-east-1 The result was eye-opening. The tool estimated the cost increase at around $560.64/month. Here’s a breakdown of the cost: Two m5.2xlarge EC2 instances were added, each costing about $280.32/month. If I had gone ahead and applied the plan without checking this, I would’ve ended up deploying two high-cost instances that would have added a significant amount to the monthly bill. This check saved me from making that mistake, ensuring I didn’t deploy unnecessary resources that would have pushed the cloud costs higher than expected. It's Simple to Use and Doesn’t Get in the Way What I really appreciated about OpenInfraQuote was how easy it was to use. There was no need to sign up for anything, no cloud credentials to manage, and I didn’t have to leave my terminal. It worked simply with the terraform plan I already had. Once I ran the command, the tool immediately gave me a clear, easy-to-read breakdown of the cost estimate. It didn’t require any extra configuration or setup. The output showed exactly what each resource would cost per month. The estimate included the two EC2 instances I was adding, with their individual costs clearly listed. However, it didn’t include the EBS volume resizing, which was interesting. I had resized an EBS volume from 100GB to 250GB, but the output didn’t break down the cost for that specifically. It only focused on the main resources that would have the most significant cost impact, like the EC2 instances. While the EBS volume resizing didn’t show up in the output, I knew from experience that resizing volumes can still contribute to costs—especially if you’re working with a lot of data or higher performance disks. Even though the tool didn’t call it out directly, the main concern in this case was clearly the EC2 instances. I Tried It On a Real-World Setup — That’s Where It Shine After seeing how useful OpenInfraQuote was in a smaller test environment, I wanted to see how it performed on something more complex—a real-world, production-like setup. This wasn’t just a simple tweak; I needed to test it on a more intricate configuration involving auto-scaling, load balancers, CloudWatch alarms, launch templates, along with a mix of EC2 instances, EBS volumes, and NAT Gateways spread across availability zones. I thought, “Let me scale this setup to see where the tool might struggle or hit its limits.” I wasn’t expecting it to handle everything perfectly, but I was curious if it could manage the complexity and still deliver a useful cost estimate. I ran the tool expecting a similar clear, concise breakdown—and sure enou

Just Another Infra Change - Or So I Thought
I was working on a small update to the infrastructure. We needed to scale out a couple of services—specifically, adding extra capacity to our web servers and database tier. So, I had to add two EC2 instances of type m5.large
and resize an existing EBS volume from 100GB to 250GB for more storage. Simple stuff—just another change to keep things running smoothly within the infra.
I quickly wrote the Terraform config, added the new instances and the resized EBS volume, and ran terraform plan
. The output looked good—two new EC2 instances and a larger storage volume. Nothing unexpected, everything was as it should be. I was about to hit terraform apply
and move on with my day.
Then I stopped for a second. Something felt off. I’ve been through this before—what seems like a small change can easily end up costing a lot more than expected. In the past, I’ve had EC2 instances running at m5.xlarge
when t3.medium
would have been enough, costing $100/month instead of $40. I’ve also spun up additional NAT Gateways without fully considering the implications. Those small, overlooked things can quickly add up. I wasn’t about to make that mistake again.
So I thought, “Let me check the price before I apply this.” Better safe than sorry.
This Tool Helped Me Dodge a Big Bill
What I needed was a way to check the cost of my changes directly in the terminal—without logging into any UI or cloud dashboard. I wanted to get the cost estimate as part of my workflow, right alongside running terraform plan
, so I could catch any surprises before actually deploying.
I did some quick research, just scrolling through Reddit, LinkedIn, and Twitter for about 20 minutes, looking for a tool that could do exactly that. After a bit of digging, I found OpenInfraQuote. It seemed to check all the boxes: a command-line tool that would pull in your terraform plan
, match it with AWS pricing, and give you an estimate without leaving your terminal.
Curious to try it out, I gave it a shot. Here’s how it worked:
- I ran the standard Terraform plan:
terraform plan -out=tf.plan
- Then, I converted the plan into JSON format:
terraform show -json tf.plan > tfplan.json
- Finally, I used OpenInfraQuote with the pricing sheet:
oiq match --pricesheet prices.csv tfplan.json | oiq price --region us-east-1
The result was eye-opening. The tool estimated the cost increase at around $560.64/month. Here’s a breakdown of the cost:
Two m5.2xlarge
EC2 instances were added, each costing about $280.32/month.
If I had gone ahead and applied the plan without checking this, I would’ve ended up deploying two high-cost instances that would have added a significant amount to the monthly bill. This check saved me from making that mistake, ensuring I didn’t deploy unnecessary resources that would have pushed the cloud costs higher than expected.
It's Simple to Use and Doesn’t Get in the Way
What I really appreciated about OpenInfraQuote was how easy it was to use. There was no need to sign up for anything, no cloud credentials to manage, and I didn’t have to leave my terminal. It worked simply with the terraform plan
I already had.
Once I ran the command, the tool immediately gave me a clear, easy-to-read breakdown of the cost estimate. It didn’t require any extra configuration or setup. The output showed exactly what each resource would cost per month.
The estimate included the two EC2 instances I was adding, with their individual costs clearly listed. However, it didn’t include the EBS volume resizing, which was interesting. I had resized an EBS volume from 100GB to 250GB, but the output didn’t break down the cost for that specifically. It only focused on the main resources that would have the most significant cost impact, like the EC2 instances.
While the EBS volume resizing didn’t show up in the output, I knew from experience that resizing volumes can still contribute to costs—especially if you’re working with a lot of data or higher performance disks. Even though the tool didn’t call it out directly, the main concern in this case was clearly the EC2 instances.
I Tried It On a Real-World Setup — That’s Where It Shine
After seeing how useful OpenInfraQuote was in a smaller test environment, I wanted to see how it performed on something more complex—a real-world, production-like setup. This wasn’t just a simple tweak; I needed to test it on a more intricate configuration involving auto-scaling, load balancers, CloudWatch alarms, launch templates, along with a mix of EC2 instances, EBS volumes, and NAT Gateways spread across availability zones.
I thought, “Let me scale this setup to see where the tool might struggle or hit its limits.” I wasn’t expecting it to handle everything perfectly, but I was curious if it could manage the complexity and still deliver a useful cost estimate.
I ran the tool expecting a similar clear, concise breakdown—and sure enough, it delivered. Here’s the result:
As seen in the output, the cost increase was significant—$17,870.40 per month. The main contributors to the cost were the two EC2 GPU instances, each costing around $8,935.20 per month. This immediately caught my attention and made me realize I had some high-cost resources in the mix.
The tool helped me pinpoint where the costs were escalating—mainly the EC2 instances and NAT Gateways—and gave me the opportunity to adjust the configuration before pushing it to production. Without that check, I could have ended up deploying these resources, resulting in an unexpectedly high cloud bill.
While OpenInfraQuote performed well on this setup, it did highlight one limitation: it’s excellent at estimating core services like compute, storage, and networking, but it doesn't cover every AWS service, particularly specialized or advanced ones. For example, while it accurately estimated the cost of EC2 instances and NAT Gateways, some other AWS resources, such as niche features or advanced configurations, may not be included in the estimate. Despite this, the tool effectively identified major cost drivers, making it an invaluable tool for catching potential issues before deployment.
It’s Part of My Workflow Now
After seeing how effective OpenInfraQuote was in identifying potential cost issues, I decided to make it a part of my regular workflow. Now, I run this tool every time I look at a Terraform plan. It’s become a standard step for me, right after I check the diff.
It’s simple to integrate into our process and helps my team and me spot any unexpected cost jumps before we merge anything. This way, we can catch problems before they become real financial issues. We even started including the cost output in our pull requests—just so everyone knows exactly what the change will cost in dollars, ensuring full transparency.
While OpenInfraQuote has been a great addition, it’s not perfect. There are still a few AWS services that it doesn’t price, which means you have to be mindful of certain resources. However, for the core services—compute, storage, and networking—it’s incredibly solid. The pricing estimates are based on real, up-to-date AWS data, which gives us confidence in the numbers.
Using this tool helps me avoid surprises, gives me peace of mind, and ensures that our cloud spend stays under control without adding any extra complexity or steps to the process. It's become one of those essential tools in my day-to-day workflow.
OpenInfraQuote is now essential to my workflow. Would I recommend it? Absolutely. It’s fast, precise, and saves a lot of headaches by catching cost issues before deployment. Simple tool, big impact.