FAQ
How does Infracost work?
Infracost's CLI and source control integrations (e.g. GitHub App):
-
Extract cost-related parameters
Infracost parses Terraform HCL code directly to extract only cost-related parameters, such as the instance type or disk size. Infracost automatically discovers all projects or environment in your repo. -
Retrieves prices from the Cloud Pricing API
Infracost retrieves prices from an internal Cloud Pricing API - which takes into account any custom price books in your org. The CLI does not send the Terraform plan JSON file, or any cloud credentials or secrets to the Cloud Pricing API. The API returns the prices. -
Calculates costs and evaluates policies
Infracost uses the code diff to calculate costs and evaluates the code for FinOps best practice and your tagging policies. -
Infracost Cloud
If you use Infracost Cloud, the final cost estimate and policy issues are saved in your dashboard.
Security and Privacy
Security is of paramount importance to us. We are SOC 2 Type II certified. Our Trust center page enables you to request details and provides an overview of the processes and systems Infracost has in place to ensure we are continually protecting our users' data.
What data is sent to the Cloud Pricing API?
No cloud credentials or secrets are sent to the Cloud Pricing API. Infracost does not make any changes to your Terraform state or cloud resources.
The Cloud Pricing API needs the relevant data to return a unique cloud price point. The Terraform HCL code is parsed by the Infracost CLI to extract the relevant data to make requests to the Cloud Pricing API. We also send the count of Terraform resource types to the Cloud Pricing API to enable us to better prioritize support for new resources. Additional context such as the operating system, Terraform version, type of CI system, and Infracost version are also sent alongside error tracking events so we can identify and fix issues quickly.
Here is an example request to the Cloud Pricing API for a t3.micro instance and the returned response: