Skip to content

Cost Estimation

Terrateam will provide cost estimates on each pull request that Terrateam runs a Plan operation against. A comment will be placed alongside Plan output showing the monthly spend change for the Dirspace.

Terrateam Configuration Terrateam behavior can be configured via a config.yml. This file is located in a directory named .terrateam at the root of your Terraform repository: .terrateam/config.yml.

See Configuration documentation for details.


Top-level key: cost_estimation

See Configuration Reference documentation for details.

enabledBooleanSpecified whether cost estimation is enabled.
providerStringCost estimation provider.
currencyStringA ISO 4217 currency to report results.

Default configuration:

  enabled: true
  provider: infracost
  currency: USD



The Infracost provider is served by the Infracost Cloud Pricing API.


If an Infracost API key is configured as a GitHub Actions Secret, then Terrateam will use the official Infracost public API endpoint.

To set your Infracost API Key as a GitHub Actions Secret:

  1. Export your Terraform organization/repo combination as an environment variable.

For example:

  1. Create the Infracost API Key GitHub Secret
gh secret --repo "$REPO" set INFRACOST_API_KEY

Environment Variables

Terrateam supports the following Infracost environment variables:

INFRACOST_API_KEYUser’s Infracost API key. Sign up and naviate to the Org Settings page to get your free Infracost API key.
INFRACOST_CURRENCYA ISO 4217 currency to report results. The value in the repository configuration takes precedence.