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.
Simply 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.

