Closed rjcoelho closed 3 years ago
Thanks for the kind words 😄
Could add an cli option to the terraspace new
command, but thinking right now that it's simpler to just create the .terraform-version
after generating a new project. 🤔 Closing for now.
@rjcoelho you can also use tfswitch
, then there is no need to have .terraform-version
file at all (it will read version from tf files).
You can execute tfswitch
with a hook (config/hooks/terraform.rb
):
before("init",
execute: "tfswitch"
)
btw. you can also use tenv that support Terraform as well as OpenTofu (and Terragrunt :) ) in one tool. It allow you to simplify version management and can do much more, than tfswitch.
I would like to have a per project .terraform-version file So when I do
terraspace new project infra
it should create a new .terraform-version file an the root That will be used for all stacks. Then later I just need to update one file when I bump terraform version.Great project!