Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terragrunt prefers opentofu over terraform #2138

Closed
nejec opened this issue May 8, 2024 · 3 comments
Closed

terragrunt prefers opentofu over terraform #2138

nejec opened this issue May 8, 2024 · 3 comments
Assignees
Labels
bugfix Bug needing a fix

Comments

@nejec
Copy link

nejec commented May 8, 2024

After the upgrade from docker-terragrunt:aws-tf-1.7.4-tg-0.55.10 to docker-terragrunt:aws-tf-1.8.2-tg-0.58.2 all providers references in the terraform state file went from registry.terraform.io to registry.opentofu.io, which is caused because terragrunt is using tofu instead of terraform.

$ terragrunt terragrunt-info
{
  "ConfigPath": "/data/terragrunt.hcl",
  "DownloadDir": "/data/.terragrunt-cache",
  "IamRole": "",
  "TerraformBinary": "tofu",
  "TerraformCommand": "terragrunt-info",
  "WorkingDir": "/data"
}

Currently, the image name itself is deceiving that it is primarily terraform based but behind the scenes it is actually using tofu binary.

Even this is probably not intentional, i suggest splitting images into terraform and opentofu versions.

@ChristophShyper ChristophShyper self-assigned this May 9, 2024
@ChristophShyper ChristophShyper added the bugfix Bug needing a fix label May 9, 2024
@ChristophShyper
Copy link
Member

Hello! Thanks for pointing that out. In my daily work I use slightly modified version of this module and it uses terraform.
I was not aware terragrunt switches to opentofu. Will have a look at it.

@ChristophShyper
Copy link
Member

I've just added separate versioning for OpenTofu with release https://github.com/devops-infra/docker-terragrunt/releases/tag/tf-1.8.3-ot-1.7.0-tg-0.58.3. So the two binaries don't need to fight :)
It can be used devopsinfra/docker-terragrunt:tf-1.8.3-tg-0.58.3 for Terraform.
And devopsinfra/docker-terragrunt:ot-1.7.0-tg-0.58.3 for OpenTofu.

@nejec
Copy link
Author

nejec commented May 10, 2024

insertgif.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Bug needing a fix
Development

No branches or pull requests

2 participants