aquaproj / aqua

Declarative CLI Version manager written in Go. Support Lazy Install, Registry, and continuous update with Renovate. CLI version is switched seamlessly
https://aquaproj.github.io
882 stars 39 forks source link

Support .terraform-version for Terraform #3182

Open suzuki-shunsuke opened 1 month ago

suzuki-shunsuke commented 1 month ago

Feature Overview

Support .terraform-version for Terraform.

Why is the feature needed?

.terraform-version is a common version file for Terraform.

Workaround

No response

Example Code

No response

Note

suzuki-shunsuke commented 1 month ago

One of issues is where aqua gets the information about Terraform. aqua usually gets it from registry, but .terraform-version doesn't have any reference to aqua registry. There are some options.

  1. Hardcode to aqua: If aqua-registry setting for Terraform is unstable, every time it is changed we need to release aqua. It's undesirable
  2. Hardcode aqua-registry version in aqua: This is really same with the option 1
  3. Use the latest installed aqua-registry : This is implicit and depends on the state of the machine. This is not declarative
  4. Find aqua.yaml and get aqua-registry from it: This doesn't work if aqua.yaml isn't found

I guess many Terraform version managers don't have the concept registry and accept the option 1. I think Terraform setting is stable and would not be changed so frequently.

But there are several version files like .terraform-version.

Do we need to hardcode all of them into aqua? It's undesirable.

suzuki-shunsuke commented 1 month ago