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 workflowsettings(optional) - Global workflow settings
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 underenvironments. The key is a unique alias for the sub-environment.
Core Properties
* Either
templateName or vcs must be specified, but not both.
Optional Properties
VCS Configuration
If you want to use your code directly without creating a template for it first, you can use thevcs 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
Next steps
- Creating A New Workflow - Walk through creating and deploying a workflow end to end.
- Workflow File JSON Schema - Validate and auto-complete workflow files in your IDE.
- Partial Workflow Deployment - Deploy or destroy a subset of the workflow graph.