From fc81e6716e08413fc64d71cb5b9313f72235ce3b Mon Sep 17 00:00:00 2001 From: Andrew Borg Date: Tue, 17 Dec 2024 09:24:33 -0500 Subject: [PATCH] Update documentation for Terraform distribution Signed-off-by: Andrew Borg --- .../docs/repo-level-atlantis-yaml.md | 15 ++++++++++++++ runatlantis.io/docs/server-configuration.md | 20 +++++++++++-------- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/runatlantis.io/docs/repo-level-atlantis-yaml.md b/runatlantis.io/docs/repo-level-atlantis-yaml.md index 11feb31224..a5c0edbbde 100644 --- a/runatlantis.io/docs/repo-level-atlantis-yaml.md +++ b/runatlantis.io/docs/repo-level-atlantis-yaml.md @@ -66,6 +66,7 @@ projects: branch: /main/ dir: . workspace: default + terraform_distribution: terraform terraform_version: v0.11.0 delete_source_branch_on_merge: true repo_locking: true # deprecated: use repo_locks instead @@ -262,6 +263,20 @@ See [Custom Workflow Use Cases: Terragrunt](custom-workflows.md#terragrunt) See [Custom Workflow Use Cases: Running custom commands](custom-workflows.md#running-custom-commands) +### Terraform Distributions + +If you'd like to use a different distribution of Terraform than what is set +by the `--default-tf-version` flag, then set the `terraform_distribution` key: + +```yaml +version: 3 +projects: +- dir: project1 + terraform_distribution: opentofu +``` + +Atlantis will automatically download and use this distribution. Valid values are `terraform` and `opentofu`. + ### Terraform Versions If you'd like to use a different version of Terraform than what is in Atlantis' diff --git a/runatlantis.io/docs/server-configuration.md b/runatlantis.io/docs/server-configuration.md index 303e9df067..32c483ac19 100644 --- a/runatlantis.io/docs/server-configuration.md +++ b/runatlantis.io/docs/server-configuration.md @@ -386,6 +386,16 @@ and set `--autoplan-modules` to `false`. Note that the atlantis user is restricted to `~/.atlantis`. If you set the `--data-dir` flag to a path outside of Atlantis its home directory, ensure that you grant the atlantis user the correct permissions. +### `--default-tf-distribution` + + ```bash + atlantis server --default-tf-distribution="terraform" + # or + ATLANTIS_DEFAULT_TF_DISTRIBUTION="terraform" + ``` + + Which TF distribution to use. Can be set to `terraform` or `opentofu`. + ### `--default-tf-version` ```bash @@ -1258,14 +1268,8 @@ This is useful when you have many projects and want to keep the pull request cle Namespace for emitting stats/metrics. See [stats](stats.md) section. ### `--tf-distribution` - - ```bash - atlantis server --tf-distribution="terraform" - # or - ATLANTIS_TF_DISTRIBUTION="terraform" - ``` - - Which TF distribution to use. Can be set to `terraform` or `opentofu`. + + Deprecated for `--repo-allowlist`. ### `--tf-download`