cloudposse / atmos

👽 Terraform Orchestration Tool for DevOps. Keep environment configuration DRY with hierarchical imports of configurations, inheritance, and WAY more. Native support for Terraform and Helmfile.
https://cloudposse.com/accelerate
Apache License 2.0
595 stars 82 forks source link

Docs on how to use atmos with opentofu #542

Open nitrocode opened 2 months ago

nitrocode commented 2 months ago

Describe the Feature

Atmos probably supports it since we can override the binary but I cannot find docs on it in the readme, or in atmos.tools

I did see this but it's short and doesn't explain how to use it with opentofu

Expected Behavior

Clear instructions on how to use with opentofu

Use Case

Opentofu usage instead of terraform

Describe Ideal Solution

Instructions

Alternatives Considered

No response

Additional Context

No response

kvendingoldo commented 1 month ago

At this moment if you need to have a support of Terraform as well as OpenTofu (and Terragrunt :) ) in one tool you can use https://github.com/tofuutils/tenv which my team wrote some months ago. A lot of users switched to that tool to unify version management in the world of Terraform.

You're welcome to open any issues or contribute to tenv.

osterman commented 2 weeks ago

@Gowiem shared their experience here https://masterpoint.io/updates/opentofu-early-adopters/

TL;DR:

Edit atmos.yml and set terraform.command to tofu (or whatever your binary is):

terraform:
  command: tofu

And if using our Spacelift components/integration, then also set the terraform.settings.spacelift.terraform_workflow_tool value to OPEN_TOFU:

terraform:
  settings:
    spacelift:
      terraform_workflow_tool: OPEN_TOFU