Default Terraform version
The default_tf_version
directive in Terrateam allows you to specify the global version of the Terraform CLI that should be used for all Terraform operations.
Configuration
Default Terraform Version is configured in the .terrateam/config.yml
file under the default_tf_version
key. Here’s the default configuration:
Default Terraform version options
The default_tf_version
key can be set to one of the following values:
Value | Description |
---|---|
latest | (Default) Terrateam will use the latest stable version of Terraform available at the time of execution. |
x.y.z | A specific version of Terraform, such as 1.0.0 or 0.15.5 . Terrateam will use the specified version for all Terraform operations. |
Examples
Using the latest Terraform version
This configuration will use the latest stable version of Terraform available at the time of execution.
Specifying a specific Terraform version
This configuration will use Terraform version 1.0.0
for all Terraform operations.
Considerations
When setting the default Terraform version, keep the following in mind:
- Using the
latest
value ensures that you are always using the most up-to-date version of Terraform, which can include bug fixes and new features. However, it may also introduce breaking changes that could affect your Terraform configurations. - Specifying a specific version of Terraform ensures that your Terraform operations are consistent and reproducible, as the same version will be used every time. This can be particularly important when working with a team or across multiple environments.
- If a specific version of Terraform is required for a particular directory or workspace, you can override the global default by specifying the desired version in the relevant workflow configuration.