Environment types
On this page
Environment types are a classification of environments. They can be used in rules to identify the proper definition to use during a deployment.
Environments are always of a certain type. This helps people to understand their purpose beyond the name. A very popular scheme is to categorize environments with their stage in the software development lifecycle to show how far changes have been progressed. E.g.: development –> staging –> production.
This helps as soon as more than one environment of a type is present. Think of two environments named “apac” and “europe” which are both of type “development”.
There are however different requirements with each organization and you could also rather group on geolocation, which would lead to e.g. the same environments being both named “staging” but one being of type “apac” and one being of type “europe”.
There are no strict rules and you can create as many environment types as you need to fulfill your requirements.
You can create and manage environment types using the hctl CLI, Terraform provider , OpenTofu provider , or API.
Basic Example
resource.tf
(view on GitHub )
:
resource "platform-orchestrator_environment_type" "environment_type" {
id = "development"
display_name = "Development Environment"
}
hctl create environment-type development --set-yaml=- <<"EOF"
display_name: Development Environment
EOF
Deleting environment types
An environment type cannot be deleted as long as it is used by an environment.
To delete an environment type, you need to delete all environments with this type first. Note: the type of the environment can’t be changed.