Skip to main content
Environment Discovery in env zero enables teams to identify, import, and manage infrastructure environments - whether dynamically created during development workflows or existing infrastructure deployed outside env zero. This feature is foundational to streamlining DevOps practices, increasing governance, and maximizing infrastructure visibility.

Why Environment Discovery Matters

Many teams manage a mix of ephemeral and long-lived environments across their cloud platforms. Without centralized management, these environments can lead to configuration drift, governance issues, and operational inefficiencies. env zero’s discovery capabilities are designed to:
  • Provide centralized visibility into all environments.
  • Simplify the onboarding of infrastructure deployed outside env zero.
  • Support automated workflows for previewing and validating changes.
  • Enforce policies and controls across all discovered environments.

Discovery Use Cases

env zero supports three primary workflows for discovering and managing environments:

1. Discovery by File

This feature enables teams to create and manage environments from templates using a YAML marker file (env0-discovery.yaml) placed at the root of their repositories. It provides a code-first approach that eliminates circular dependencies and supports multi-repo, decentralized environment management.
  • Creating environments directly from templates using code
  • Managing multiple environments from a single repository using one env0-discovery.yaml file
  • Seeing actual infrastructure changes in PR plans
  • Avoiding the circular dependency problem with the Terraform Provider
Learn more: Discovery by File

2. Creation per Pull Request

This feature automatically provisions an environment for each Git pull request. It integrates seamlessly with your CI/CD workflows, making it ideal for:
  • Previewing changes before merging to the main branch.
  • Enabling stakeholder reviews in an isolated environment.
  • Automatically destroying environments after merge to optimize resource usage.
Learn more: Creation per Pull Request

3. Onboarding

This process allows you to import externally deployed Infrastructure as Code (IaC) environments—such as Terraform or Terragrunt projects—into env zero. These environments were not originally deployed using env zero but are brought under its management for better governance and automation. Use cases include:
  • Onboarding teams with pre-existing infrastructure into env zero.
  • Managing and tracking environments that were deployed manually or via other tools.
  • Enforcing policies, visibility, and consistency across imported environments.
Learn more: Mass Import (Onboarding)

Next Steps

Choose the method that aligns best with your team’s infrastructure practices—or use multiple methods to ensure comprehensive environment coverage and control. For step-by-step guidance, visit the documentation pages linked above or contact our support team.