Closed athak closed 2 months ago
turns out that we always call terraform under the hood when syncing plans to Terramate Cloud. We'll provide a fix soon that will allow you to switch to opentofu using the --opentofu
flag to switch to tofu similar to what we've done for terragrunt
@soerenmartius sounds great, thanks! Any chance that Terramate can autodetect what binary to use based on the command used for run
? You could always override with a flag but from UX point of view it would better IMHO.
@soerenmartius sounds great, thanks! Any chance that Terramate can autodetect what binary to use based on the command used for
run
? You could always override with a flag but from UX point of view it would better IMHO.
good idea, let me discuss this with the team and see what we can come up with
Hey @athak
We released Terramate v0.8.0 last week with support for --tofu-plan-file
.
Now your command should be:
terramate run --continue-on-error \
--sync-preview \
--tofu-plan-file=out.tfplan \
--debug-preview-url preview_url.txt \
-- \
tofu plan -out out.tfplan -lock=false
Let us know if it works for you.
Describe the bug The Terramate Cloud sync preview in the CLI is always using
terraform
toshow
the plan files. When using OpenTofu and there is a version discrepancy between the binaries in the path (e.g. OpenTofu 1.6.x and Terraform 1.5.x) or when there is no Terraform installed, it results in error.To Reproduce Run:
without a
terraform
binary in the path or with aterraform
binary that it is a different version.Expected behavior It should use OpenTofu to
show
the plan files and not result in error.Log Output With different versions installed:
Without Terraform installed:
Environment (please complete the following information):