Setting Up a New Environment

env0 provides two approaches for creating a new environment:

  1. Based on a pre-defined Template
  2. Based on a direct VCS integration

env0 Templates can be very useful as they allow reusability and RBAC, however in some cases you may want to simply connect to your VCS directly without using Templates to avoid unnecessary complexity.

Both approaches will result in a complete env0 environment with all of the available features so you can choose the approach that most fits your style and use case.

๐Ÿ“˜

Permissions

If you are a project planner - you must select a template for the new environment.
If you are an organization admin - you will be prompted to select between Template / VCS.

To enable Environment creation based on VCS integration for non organization admins, create an Organization Role with the Create & Edit Templates permission. Users may have to log out and log back in to deploy see the modal to deploy an Environment without a Template.
Organization -> Settings -> Roles -> (Create or update an existing role with the permission)

To create a new environment, all you have to do is choose a specific Project and click on the CREATE NEW ENVIRONMENT button (located in the top right corner).

Based On a Pre-defined Template

This choice is great for you if you want to use env0 templates with all of their benefits.

To run an environment based on a pre-defined template, follow these short instructions:

  1. Select your desired Template.
  2. Set environment details: environment name, workspace name (optional - only for Terraform), Time To Live (TTL) , Variables and Terragrunt Working Directory (only refers to Terragrunt Templates, optional).

Based On a Direct VCS Integration

This choice is great for you if you don't want to overwhelm yourself with env0 templates - just connect to your VCS and deploy.

To run an environment based on a direct VCS integration, follow these short instructions:

Select one of the many supported IaC types.

Select one of the many supported Git repositories.

Once a Git repository has been selected a new window will load, asking you to authenticate to that git account. This will install the Env0 application as a trusted source to read/write to your chosen repositories.

Add any Terraform or environmental variables you may want on the next screen.

Set the environment details and options.

Click done to complete the environment creation and run your first deployment.

๐Ÿ‘

Import existing environment (for Terraform only)

You may import an existing Terraform environment by specifying the Workspace Name

๐Ÿ“˜

Auto deploying created Environment

The default behavior in env0 is to automatically deploy a created environment.

In case you would like to create the environment without deploying, you can use the create environment API and set the preventAutoDeploy param to true.

This is also supported in our Terraform Provider