Discover
Activate the Environment Discovery feature within your project and configure it to detect your existing environments.

- Path: The environmentโs location within your Git repository.
- Target Project: The project where the environment will be placed (as defined by your Environment Placement configuration).
- Target Environment: The generated name for the new environment, based on your Environment Placement configuration.

Initiate Import Batch
Once env zero has discovered your environments, you can initiate the import by selecting the desired environments and clicking the โImportโ button.
- Workspace Name (required) Enter the workspace name for each selected environment to ensure that env zero references the same environment and state, rather than creating a new one.
- Variables: Define the necessary Terraform or environment variables. These can be set at either the Environment or Project level.
- Deployment Credentials (recommended but not required): Specify the credentials env zero will use to deploy your environment and connect to your cloud account successfully.

Pre-filled Terraform VariablesDuring the environment discovery process, env zero scanned your Git repository and reviewed the Terraform environments and variables in use.env zero will automatically pre-fill your Terraform variable keys with those defined in the environment. If a
default
value was specified for a variable, env zero will pre-fill the corresponding value as well.
What is considered a Successful Import?An import is considered successful and its status will update to โImportedโ when the following conditions are met:
- The deployment completes successfully, with no errors during the process
- The Terraform plan shows 0 changes, meaning env zero deployed the environment in the same workspace without attempting to create new resources. It successfully uses the existing resources
Rerun Imports
Mistakes can happenโwhether itโs a missed variable, incorrect credentials, or other human errors. These issues can cause an import to fail. To address this, env zero provides a Rerun option. You can select the environments that encountered errors, adjust their configurations as needed, and run the import process again.
