Update terraform-versions.md

Updates for https://github.com/runatlantis/atlantis/pull/789#issuecomment-581976747
This commit is contained in:
Kenneth Tan Xin You
2020-02-08 18:09:42 +08:00
committed by GitHub
parent 885ad266bb
commit 3ce88ebce6

View File

@@ -3,6 +3,7 @@
You can customize which version of Terraform Atlantis defaults to by setting
the `--default-tf-version` flag (ex. `--default-tf-version=v0.12.0`).
## Via `atlantis.yaml`
If you wish to use a different version than the default for a specific repo or project, you need
to create an `atlantis.yaml` file and set the `terraform_version` key:
```yaml
@@ -13,8 +14,16 @@ 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:
```tf
terraform {
required_version = "0.12.0"
}
```
See [Terraform `required_version`](https://www.terraform.io/docs/configuration/terraform.html#specifying-a-required-terraform-version) for reference.
::: tip NOTE
Atlantis will automatically download the version specified.
:::