Skip to content

Enhance terraform/tofu segment version detection with tenv support #7168

@grimm26

Description

@grimm26

Code of Conduct

  • I agree to follow this project's Code of Conduct

What would you like to see changed?

The terraform segment tries to detect version from one of these files:

  • main.tf
  • versions.tf
  • terraform.tfstate

terraform.tfstate is only applicable if you are using a local state file, which no production setup should. In my setup I don't use main.tf or versions.tf so this segment doesn't really work.

Many people use tenv to manage their terraform/tofu version and so we can check if there is a hint from tenv to detect the version. The segment could check:

Or just use tenv tofu detect and tenv terrform detect

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions