Skip to main content
This page provides a complete reference for the env0.workflow.yaml (or .yml) file used to define env zero Workflows.

File Structure

The workflow file has two main sections:
  • environments (required) - Defines the sub-environments in the workflow
  • settings (optional) - Global workflow settings
Example:
env0.workflow.yaml

Settings

Global settings that apply to the entire workflow. environmentRemovalStrategy (string) controls what happens when a sub-environment is removed from the workflow file.
  • Default: detach
  • detach - The environment is detached but not destroyed.
  • destroy - The environment is destroyed after you deploy the updated workflow.

Sub-Environment Properties

Each sub-environment is defined as a key-value pair under environments. The key is a unique alias for the sub-environment.

Core Properties

* Either templateName or vcs must be specified, but not both.

Optional Properties

If you also manage the workflow environment with the env zero Terraform provider, see Terraform provider settings for sub-environments for how requiresApproval, workspace, and revision interact with the sub_environment_configuration block.

VCS Configuration

If you want to use your code directly without creating a template for it first, you can use the vcs object with the following properties:

VCS Authentication Properties

VCS Provider Flags

IaC Version Properties

CloudFormation Properties

Helm Properties

Examples

Simple Workflow with Template References

A basic workflow using pre-defined templates with dependencies.
env0.workflow.yaml

Workflow with Inline VCS Configuration

Define IaC source directly without creating separate templates:
env0.workflow.yaml

Mixed Workflow with Settings

Combine template references and inline VCS with global settings.
env0.workflow.yaml

Workflow with Variable Interpolation

Use environment variables to conditionally disable sub-environments.
env0.workflow.yaml
Use variable interpolation with the disabled property to enable partial workflow deployments based on environment variables.
Learn more: Workflow file JSON schema

Next steps