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.

Configuration

Top-level key: cost_estimation

See Configuration Reference documentation for details.

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

Default configuration:

cost_estimation:
enabled: true
provider: infracost
currency: USD

Providers

Infracost

API Key

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:

export REPO="OWNER/REPO"
  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:

NameDescription
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.
We use cookies and similar technologies to provide certain features, enhance the user experience and deliver content that is relevant to your interests. Depending on their purpose, analysis and marketing cookies may be used in addition to technically necessary cookies. By clicking on "Agree and continue", you declare your consent to the use of the aforementioned cookies. Here you can make detailed settings or revoke your consent (in part if necessary) with effect for the future. For further information, please refer to our Privacy Policy .