<a id="cloud-environments"></a>

# Environments on Confluent Cloud

A Confluent Cloud environment contains Kafka clusters and deployed components, such as Connect,
ksqlDB, and Schema Registry. You can define multiple environments in an [organization](organizations/cloud-organization.md#cloud-organization),
and there is no charge for creating or using additional environments. Different departments
or teams can use separate environments to avoid interfering with each other.

This topic contains steps to manage environments using the Confluent Cloud Console, but
you can also use the Confluent CLI `confluent environment` commands ([Confluent CLI reference](https://docs.confluent.io/confluent-cli/current/command-reference/environment/index.html))
or [Confluent Cloud APIs](../../../api.md#cloud-apis) to manage environments.

You cannot move cluster deployments between environments. Group all clusters
that should share one Schema Registry in the same environment. You can create separate
development, test, and production environments to isolate schema iteration in
development from the production Schema Registry.  There is no enforcement of which Schema Registry
the clients of a Kafka cluster must use. For more information on Confluent Cloud Schema Registry,
see [Work with schemas and data contracts](../../../sr/schemas-manage.md#cloud-schemas-manage).

## View an environment

To view an environment:

1. Open the Confluent Cloud Console and go to the **Environments** page at
   [https://confluent.cloud/environments](https://confluent.cloud/environments).
2. Click on the environment name to view the details of the environment.

Each environment page shows the number of clusters within the environment and
provides links to [edit](#cloud-environment-update) or
[delete](#cloud-environment-delete) the environment.

<a id="cloud-environment-create"></a>

## Add an environment

To add an environment:

1. Open the Confluent Cloud Console and go to the **Environments** page at
   [https://confluent.cloud/environments](https://confluent.cloud/environments).
2. Click **Add cloud environment**.
3. Enter a name for the environment.
   The environment name:
   - Cannot exceed 64 characters.
   - Must begin and end with alphanumeric characters.
   - Can contain hyphens and underscores, but cannot
     contain spaces.
4. Click **Create**.

The new environment page appears and you can
[create a cluster](../../../clusters/create-cluster.md#cloud-create-cluster)
or get started with the [Quick Start for Confluent Cloud](../../../get-started/index.md#cloud-quickstart).

### Create an environment with Terraform

Create an environment by using the Confluent Terraform provider. For more
information, see [confluent_environment Resource](https://registry.terraform.io/providers/confluentinc/confluent/latest/docs/resources/confluent_environment).

<a id="cloud-environment-update"></a>

## Edit an environment name

To edit an environment name:

1. Open the Confluent Cloud Console and go to the **Environments** page at
   [https://confluent.cloud/environments](https://confluent.cloud/environments).
2. Click on the environment that you want to rename or edit the name. The side panel
   for the environment appears.
3. In the environment panel, next to the environment name, click **Edit**.

   The **Edit environment** dialog appears.
4. Edit the environment name and then click **Save**.

The environment name is updated and the page for the environment appears with the
updated name.

<a id="cloud-environment-delete"></a>

## Delete an environment

You can delete an environment as long as it is not the only environment in your account.
If you have only one environment, it cannot be deleted.

If any Kafka cluster in the environment has
[deletion protection](../../../clusters/deletion-protection.md#cloud-cluster-deletion-protection) enabled, you
cannot delete the environment until you disable that protection. For more
information, see [How deletion protection blocks environment deletion](../../../clusters/deletion-protection.md#cluster-deletion-protection-cascade).

#### WARNING
When you delete an environment, the following Confluent Cloud resources within
that environment are also deleted:

* Confluent Cloud clusters
* Schema Registry
* Connect connectors
* ksqlDB clusters
* Flink compute pools
* API keys (Note that Flink-related API keys are not deleted because they
  belong to the Flink region, which is outside of the context of an environment.)

To delete an environment:

1. Open the Confluent Cloud Console and go to the Environments page at
   [https://confluent.cloud/environments](https://confluent.cloud/environments).
2. Click on the environment you want to delete.
3. On the top right, click **More** to expand the menu, then click **Delete**. A confirmation dialog appears.
4. Confirm that you want to delete the environment by entering the environment
   name and then click **Continue**.

The environment is deleted and all clusters within the environment are deleted.
On the **Environments** page, the deleted environment is no longer displayed.
