Skip to main content

Infracost

The Infracost integration provides cost estimates for pull requests. This integration shows how much a change will increase or decrease the monthly spend of a dirspace.

Usage

Infracost is enabled by default. The cost estimations will be included in the output of a plan operation.

  • No cloud credentials or secrets are sent to the Infracost Cloud Pricing API
  • Infracost does not make any changes to your Terraform state or cloud resources

Configuration

Environment Variables

NameRequiredDescription
INFRACOST_API_KEYNoUser's Infracost API key. Sign up and go to the Org Settings page to get your free Infracost API key.
INFRACOST_CURRENCYNoA ISO 4217 currency to report results. The value in the repository configuration takes precedence.

Repository Configuration

Infracost is configured in the repository configuration file .terrateam/config.yml in the cost_estimation section.

NameDefault ValueDescription
enabledtrueIf cost estimation is enabled.
providerinfracostProvider to use.
currencyUSDA ISO 4217 currency to report results. Takes precedence over the environment variable.

Example configuration:

cost_estimation:
enabled: true
provider: infracost
currency: USD