Skip to content

Commit

Permalink
Clarify the docs about setting the terraform version, especially since
Browse files Browse the repository at this point in the history
v0.21.0
  • Loading branch information
grimm26 committed Dec 7, 2022
1 parent b6e1c61 commit af2579a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions runatlantis.io/docs/terraform-versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@ projects:
See [atlantis.yaml Use Cases](repo-level-atlantis-yaml.html#terraform-versions) for more details.
## Via terraform config
Alternatively, one can use the terraform configuration block's `required_version` key to specify an *exact* version:
Alternatively, one can use the terraform configuration block's `required_version` key to [specify an exact version or version constraint](https://developer.hashicorp.com/terraform/language/expressions/version-constraints#version-constraint-syntax):
```tf
terraform {
required_version = "0.12.0"
}
```
See [Terraform `required_version`](https://www.terraform.io/language/settings) for reference.
See [Terraform `required_version`](https://developer.hashicorp.com/terraform/language/settings#specifying-a-required-terraform-version) for reference.

::: tip NOTE
A `terraform_version` specified in the `atlantis.yaml` file takes precedence over both the default version and the `required_version` in the terraform config.
:::

::: tip NOTE
Atlantis will automatically download the version specified.
Expand Down

0 comments on commit af2579a

Please sign in to comment.