While creating a new template, or editing one, you can specify the Terraform version you would like your template to use.
To associate a Terraform version with a template follow this:
- Go to the organization's Templates page.
- Click the Settings button of your desired Template.
- The Template Settings screen includes a
Terraform Versiondropdown. Associate your desired Terraform version with your template
- Click the Save button to commit your changes.
Please note that changing this value in existing template, might affect running environments.
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.
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.
Updated 4 months ago