Additional Controls



Additional Controls are features that aren’t available through the user interface, but can be used by setting the appropriate environment variables, at the Organization, Template, Project, or Environment level.

Terraform Partial Apply

Using the environment variable ENV0_TERRAFORM_TARGET, you can specify specific resources that will be targeted for apply. The value of the variable will be passed to Terraform -target flag.
Read more here.

Specify Terraform/Terragrunt Versions

Using the environment variable ENV0_TF_VERSION, you can specify the Terraform version you would like your environment to use. You can read more here.

You can also use the ENV0_TERRAGRUNT_VERSION to specify the Terragrunt version for your applicable terragrunt deployments.


Specifying version in Terraform code

You can also set the version in your Terraform code and we will automatically install the correct version for using tfenv

Custom Terraform Variables File

Using the environment variable ENV0_TERRAFORM_CONFIG_FILE_PATH, you can select multiple Terraform variable files to pass on to Terraform. The list of filenames should be comma delimited.

Terraform Backend Config

Using the environment variable ENV0_TERRAFORM_BACKEND_CONFIG, you can pick a custom backend config to be used in terraform init. The value of the variable will be passed to the -backend-config flag.
If you would like to have multiple -backend-config declarations, then you can pass the multiple values in the ENV0_TERRAFORM_BACKEND_CONFIG environment variable as a comma-delimited string. For example, a value of /path/to/config/file,key=value will result in the flags -backend-config="/path/to/config/file" -backend-config="key=value".
Read more here.

Enable Cost Tagging Per Environment

Cost tagging works on the project level and once enabled, env0 will tag every environment under that project. It can happen that sometimes (mainly for debugging purposes) you'd wish to turn on cost tagging only for a specific environment and not for the whole project.
Using the environment variable ENV0_ENABLE_COST_TAG, you can enable it per your environment.

Skip Workspace Commands

For each environment, we are creating a new terraform workspace if it doesn't exist, or selecting it if it exists. In addition, we delete the workspace when destroying the environment.
If you wish not to execute those commands you can skip them by using the environment variable ENV0_SKIP_WORKSPACE and set its value to be true. Please remove the environment variable all together or set its value to be empty to run the workspace commands.

Skip Git Submodules

By default if you have git submodules configured in your repository env0 clone them with depth of 1.
If you do not wish to clone your git submodules you can by using the ENV0_SKIP_SUBMODULE_GIT_CLONE environment variable and set its value to be true.
If you remove the environment variable all together or set its value to be empty we will clone your git submodules.

Did this page help you?