jason-johnson / azure-pipelines-tasks-terraform

Azure Pipelines extension for Terraform
MIT License
124 stars 53 forks source link

Support for semver #286

Open pszypowicz opened 1 year ago

pszypowicz commented 1 year ago

In the "required_version" in terraform block you can specify requirements for the version. For example:

terraform {
  required version = "~>1.3"
}

Would it be possible to match "latest" according to it?

Currently I'm depending on the 3rd party tools, like tfswitch which implements that.

Thank you!

jason-johnson commented 1 year ago

Your question is for terraform itself. This project is an Azure Devops extension which calls terraform.

pszypowicz commented 1 year ago

This question is for "installer" part of your extension :)

I was just thinking if it's possible, that the "latest" tag could be aware of required_version based on the tf files in the, for example, working directory.

jason-johnson commented 1 year ago

Oh sorry. I sometimes get terraform questions here. I’ll have a look.

kvendingoldo commented 4 months ago

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.