Targeting resources and modules allows us to pinpoint exactly what needs to be changed instead of deploying a whole environment. Such selective deployments minimize risks associated with broader changes, ensuring that updates are precise and efficient. This precision is useful for testing, enabling quicker iterations and focused debugging. With Targeted Deployments, teams can confidently experiment with changes, minimizing risks and streamlining development workflows.Documentation Index
Fetch the complete documentation index at: https://docs.envzero.com/llms.txt
Use this file to discover all available pages before exploring further.
Supported versions
Targeted deployments are not supported on self-hosted agents prior to version3.0.611. However, the ENV0_TERRAFORM_TARGET environment variable can still be used.
Using Resource Targeting
Below are all the different ways in which targets could be specified.Combining Target InputsMore than 1 option could be used at a time.env zero will take into account all the different definitions of targets, and combine them.
Using the UI
Whenever you deploy or re-deploy, you can open theTargeted Resources section.

Adding a Custom TargetThe list of resources contains resources from the latest deployment.So when adding new resources, they won’t be present in the list - but only after they’re deployed.If you want to target new additions, you need to add them manually by typing their full address, and hitting
EnterUsing the ENV0_TERRAFORM_TARGET variable
Another option is to use theENV0_TERRAFORM_TARGET control variable.
Set the environment variable, separated with commas for multiple values, and it will be directly converted to -target flags.
Using the TF_CLI_ARGS_plan variable
TheTF_CLI_ARGS_plan is nifty for forcing flags and arguments to commands.Providing a list of targets for
TF_CLI_ARGS_plan would therefore take effect over deployments in env zero.
Viewing Targeted Resources
After executing a targeted deployment, you can go to the deployment page and click on theTargeted Resources field.


Next steps
- Additional Deployment Controls - Learn about ENV0_TERRAFORM_TARGET and other control variables.
- Environment Overview - Understand the full deploy and redeploy lifecycle.
- Running Ad Hoc Tasks - Run state manipulation commands without committing to git.