Terracost is a feature that enables the cost estimation of any Terraform-defined infrastructure. This allows organizations to keep track of any impact that a change to infrastructure could have on finances. It is an open-source project that can be audited, contributed to, and quickly integrated with any pipeline that uses Terraform.
# Cost estimation
$ terraform plan -out=./plan; terraform show -json ./plan > plan.json $ cy terracost estimate --plan-path plan.json PLANNEDCOST PRIORCOST RESOURCEESTIMATES 71.71 53.24 3
# In the Cycloid pipeline
In the context of the pipeline, you can use the Cycloid Concourse Resource that can be easily plugged right after a
terraform plan step and just before a notification mechanism.
# Example of output
# Provider support
At the moment, Terracost only supports a limited number of AWS resources. This is changing quickly as we're adding support for more resources and providers. Please see the detailed list of supported resources for more information.
# Frequently Asked Questions
# Can I use Terracost with a tfstate or a directory of IaC files?
No. Currently, only Terraform plan files in JSON format are supported.
# There is no provider/resource that I need.
We're constantly adding support for more resources, as well as providers besides AWS. Terracost is an open-source project so consider contributing to it.
# Can I use TerraCost output in an InfraPolicy?
No, but this option is coming soon.