What's an environment?

Learn about environments in Code Pipes, which are essential for managing the infrastructure and deployment of applications within a project. Understand their purpose, hierarchy, elements, and available actions.

Approx Reading Time: 5 minutes

What is an Environment?

An environment is a crucial component of a project in Code Pipes. It serves as a container for the infrastructure that the project's applications will utilize and specifies the deployment location for those applications.

Creating different environments, such as development, test, and production, caters to diverse user needs. In the Code Pipes hierarchy, an environment is a child of a project and inherits properties like policies and Terraform/environment variables from the project by default. However, you can override these inherited properties at the environment level as needed.

In Code Pipes, the term "Environment" encompass the following elements:

An environment consists of the following elements:

  • Environment details: Name and optional description.

  • Cloud account: The pre-configured cloud account in GCP or AWS where you will deploy your applications.

  • Code source: Refers to the GitHub credentials used for the code repository.

  • Code source repo: Specifies the location of the application code, including the repository URL, revision type, revision identifier, and Terraform directory path.

  • Variables: Allows you to set environment variables and Terraform variables required by your Terraform code.

  • View policies: Choose a security policy, such as "Ollion Best Practice" or "Unrestricted," to validate your Terraform against.

Environment Actions

Once an environment is created, you can perform several actions within the Code Pipes UI:

  • Validate: Validate your Terraform code against the chosen security policy.

  • Deploy: Deploy the infrastructure of the environment to your cloud account.

  • Destroy: Destroy the infrastructure created by the deployment in your cloud account.

Creating an Environment

environment-create

Updating an Environment

environment-update

Adding variables to Environment

environment_var_add

Deleting an Environment

environment-delete

Deploying an Environment

environment-deploy-pipeline

Creating a Environment Set

environment-set-create