Links

Create & Delete Environments

Introduction

Each new App in Humanitec is created with a default Environment called Development. You can add as many other Environments to the App as you need. Note, that the default Environment cannot be deleted without deleting the entire App. This section explains how to create a new Environment based on an existing Environment.

Create a new Environment

To create a new Environment, you will need to have the Administrator role within your Organization or hold the Owner/Developer role on the App. Learn more about RBAC in Humanitec here.
UI
CLI
API
  • New Environments can be created from the App Details Screen.
  • Click on the + next to your existing Environment(s).
  • Configure a new Environment via the Create new environment overlay window:
    • Clone from - define which existing Environment you want to clone to create the new Environment. By default, Humanitec takes the last Deployment within the Environment you are cloning from to create your new Environment.
    • Environment type - allows you to select the Environment Type that should be used for the new Environment.
    • Environment name - specific the name for the new Environment following your internal standards.
  • Click on Create.
Example for the creation of a new Environment
After hitting Create, your new Environment is created. Note, that Humanitec does not automatically trigger a Deployment to a newly created Environment. So make the changes you might want to make in your new Environment and then hit the Deploy button to run your first Deployment in the new Environment.
Note, that in the Deployment history on the left-hand side you can see which Environment (and Deployment) your new Environment was cloned from.
Example for a newly created Environment
Our CLI is currently in closed beta. Please contact us if you want to learn more.
You can create a new Environment via the Add New Environment endpoint.

Delete Environments

To delete an Environment, you will need to have the Administrator role within your Organization, or hold either the Owner or the Developer role on the App together with being a Deployer for that environment type. Learn more about RBAC in Humanitec here.
UI
CLI
API
  • Environments can be deleted from the App Details Screen.
  • Click on the three dots next to the Environment you want to delete.
  • Select Delete from the dropdown.
  • Confirm that you want to delete the Environment. Note, that this step cannot be undone.
Example of how to delete an Environment
Our CLI is currently in closed beta. Please contact us if you want to learn more.
You can delete Environments via the Delete Environment endpoint.
The default Environment Development that is created for each new App in Humanitec cannot be deleted without deleting the entire App.
It might not be a good idea to delete Environments especially in the context of an audit process and audit trails. We are thus working on an Enterprise feature that will archive Environments that are not needed any longer instead of deleting them. This also allows for the recovery of deleted Environments. Reach out to us if you want to learn more about our Enterprise feature set.