- name: Will be displayed in the Workflow graph
- templateName(optional, conflicts with vcs): A name of a pre-defined template to deploy
๐ง Template NamingWhile we donโt enforce it, the best practice is to use unique template names.
Otherwise, the Workflow will randomly choose one of the templates, without considering any permission restrictions.
Otherwise, the Workflow will randomly choose one of the templates, without considering any permission restrictions.
- vcs(optional, conflict with templateName): Information to integrate with the VCS and all the information used to create a template
- needs (optional): An array of sub environments which all must be successfully deployed before this sub environment can start deploying
- revision: (optional) A revision for this specific environmentโs Template to deploy
-
workspace (optional): A name for the terraform workspace for a new environment
Note: The Workspace attribute can not be set for an existing environment.Workspace for other IaCsFor Helm Templates - Theworkspace
configuration sets therelease-name
.
For Pulumi and CloudFormation templates - The workspace configuration sets thestack-name
. - disabled (optional): Setting this to true will leave this particular environment out of this workflow. Combined with the ability to set environment variables, this is handy for allowing partial workflow deployments
- requiresApproval (optional): Setting this to true will force this particular environment to require approval in the Workflow, meaning that the Workflow will not proceed with the environments until the deployment is approved
Prioritization of Environment ApprovalIt is possible to define an environment in a workflow in multiple ways. Follow this order for prioritizing approval value:
- Using the ENV0_REQUIRES_APPROVAL environment variable to force approval
- Approval policy - If an approval policy is defined it will always be evaluated for the environment
- Value from the UI - Determines whether a value is defined in the UI or from an API request
- Value defined from the workflow
requiresApproval
field
Example configuration
Removing EnvironmentPlease note that by default, removing an environment from the workflow file and redeploying it is not supported, as your environment will be left detached from the workflow.If you would like env zero to destroy the removed environments, you need to add a Settings section to your_env0.workflow.yml_
Creating a Workflow in the UI
- Create a new template and select env zero Workflow as the Template Type:


- Create an Environment based on the Workflow template.
You can choose any of the workflow environments from the dropdown menu in the top right corner.

Remote BackendThe Remote Backend option will be applied to Terraform templates only. For further documentation about remote backend, follow this guide.
Overrides NoteThe values you set here for workspace and revision will override the ones youโve defined in the workflow file for the corresponding environment.If you would like to set the whole workflow to the same workspace name value, you can do so by setting the workflow workspace name, and leaving the sub environments blank.Note that since Terragrunt uses a working directory instead of workspace name, the workspace name override wonโt apply to Terragrunt template type.When marking the workflow as remote backend, you must provide unique names for each of the sub environments workspaces.

-
Deploy