Common Use Cases
Terraform Versions

Terraform Versions

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.

Multiple versions of the Terraform CLI can be configured to be used for Terrateam operations. There are multiple ways to specify the version. The versions are evaluated in the order described below where the version is taken from the first match.

  1. A .terraform-version file in the directory terraform is being executed in, for example prod/ec2/.terraform-version.
  2. A .terraform-version file in the root directory of the repository.
  3. A custom workflow in .terrateam/config.yml.
  4. The default_tf_version in .terrateam/config.yml.

We recommend that a default Terraform CLI version is explicitly specified in the repository. Terrateam periodically upgrades the version of Terraform and specifying the version explicitly guarantees that the version is consistent between runs.

.terraform-version in the Directory

A version can be specified in the .terraform-version file in any directory. When terraform is executed, the specified version will be used.

.terraform-version in the Root Directory

A .terraform-version file can also be put in the root directory of the repository.


The Terraform version can be specified in a workflow:

    tags: [ec2, us-east-1, production]
    tags: [ec2, us-west-1, production]
  - tag_query: ec2 us-east-1 production
    terraform_version: 1.2.2
  - tag_query: ec2 us-west-1 production
    terraform_version: 0.15.5

Default Version

A default version can be specified in the .terrateam/config.yml file.

default_tf_version: 1.2.2