Terraform Version

While creating a new template, or editing one, you can specify the Terraform version you would like your template to use.

Select Specific Terraform version

To associate a Terraform version with a template follow this:

  1. Go to the organization's Templates page.
  2. Click the Settings button of your desired Template.
  3. The Template Settings screen includes a Terraform Version dropdown. Associate your desired Terraform version with your template
  4. Click the Save button to commit your changes.

🚧

Existing Templates

Please note that changing this value in existing template, might affect running environments.

Resolve Version From Terraform Code

You can specify the special value called "Resolve from terraform code".
By doing so, env0 will automatically resolve the right version for you, by extracting the version from your code, using tfenv min-required option.

Override by Environment Variable

Using the environment variable ENV0_TF_VERSION, you can specify the Terraform version you would like your environment to use. It will override the existing value that exists in the template's dropdown. You can read more here.


Did this page help you?