[Yandex Cloud documentation](../../../index.md) > [Yandex Resource Manager](../../index.md) > [Step-by-step guides](../index.md) > Cloud > Renaming a cloud

# Renaming a cloud

To rename a cloud, you must have the [`editor`](../../../iam/roles-reference.md#editor) role or higher for that cloud. You cannot rename a suspended cloud. If you cannot perform this operation, contact the cloud [administrator](../../../iam/roles-reference.md#admin) or [owner](../../concepts/resources-hierarchy.md#owner).

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), click ![image](../../../_assets/console-icons/layout-side-content-left.svg) or ![image](../../../_assets/console-icons/chevron-down.svg) in the top panel and select the cloud.
  1. Click ![horizontal-ellipsis](../../../_assets/console-icons/ellipsis.svg) in the top-right corner and select **Edit**.
  1. In the window that opens, enter a new cloud name. The naming requirements are as follows:

	 * Length: between 3 and 63 characters.
  * It can only contain lowercase Latin letters, numbers, and hyphens.
  * It must start with a letter and cannot end with a hyphen.

  1. Click **Save**.

- CLI {#cli}

  If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../../cli/quickstart.md#install).

  1. View the description of the cloud update command:

      ```bash
      yc resource-manager cloud update --help
      ```

  1. Get a list of available clouds:

      ```bash
      yc resource-manager cloud list
      ```

      Result:

      ```text
      +----------------------+------------------+----------------------+--------+
      |          ID          |       NAME       |   ORGANIZATION ID    | LABELS |
      +----------------------+------------------+----------------------+--------+
      | b1go33ek97iq******** | my-cloud         | bpf2c65rqcl8******** |        |
      | b1gbi30tq0m9******** | my-new-cloud     | bpfaidqca8vd******** |        |
      +----------------------+------------------+----------------------+--------+
      ```

  1. To rename a cloud, run this command:

      ```bash
      yc resource-manager cloud update \
        --name <current_cloud_name> \
        --new-name <new_cloud_name>
      ```

      Where:

      * `--name`: Current name of the cloud you want to change. Instead of the cloud name, you can provide its [ID](get-id.md) in the `--id` parameter.
      * `--new-name`: New cloud name.

          * Length: between 3 and 63 characters.
          * It can only contain lowercase Latin letters, numbers, and hyphens.
          * It must start with a letter and cannot end with a hyphen.

      Result:

      ```text
      id: b1go33ek97iq********
      created_at: "2024-12-10T09:25:22Z"
      name: my-old-cloud
      organization_id: bpf2c65rqcl8********
      ```

- Terraform {#tf}

  If you do not have Terraform yet, [install it and configure the Yandex Cloud provider](../../../tutorials/infrastructure-management/terraform-quickstart.md#install-terraform).
  
  
  To manage infrastructure using Terraform under a service account or user accounts (a Yandex account, a federated account, or a local user), [authenticate](../../../terraform/authentication.md) using the appropriate method.

  To rename a cloud created using Terraform:

  1. Open the Terraform configuration file and edit the `name` parameter value in the cloud description fragment.

      {% cut "Example cloud description in Terraform configuration" %}

      ```hcl
      ...
      resource "yandex_resourcemanager_cloud" "cloud1" {
        name            = "cloud-main"
        organization_id = "bpf7nhb9hkph********"
      }
      ...
      ```

      {% endcut %}

      For more information about `yandex_resourcemanager_cloud` properties, see [this Terraform provider guide](../../../terraform/resources/resourcemanager_cloud.md).
  1. In the command line, change to the folder where you edited the configuration file.
  1. Make sure the configuration file is correct using this command:

      ```bash
      terraform validate
      ```

      If the configuration is correct, you will get this message:
     
      ```bash
      Success! The configuration is valid.
      ```

  1. Run this command:

      ```bash
      terraform plan
      ```

      You will see a detailed list of resources. No changes will be made at this step. Terraform will show any errors in the configuration.
  1. Apply the changes:

      ```bash
      terraform apply
      ```

  1. Confirm the changes: type `yes` into the terminal and press **Enter**.

      You can verify the updated cloud name in the [management console](https://console.yandex.cloud) or the following [CLI](../../../cli/quickstart.md) command:

      ```bash
      yc resource-manager cloud list
      ```

- API {#api}

  To rename a cloud, use the [update](../../api-ref/Cloud/update.md) REST API method for the [Cloud](../../api-ref/Cloud/index.md) resource or the [CloudService/Update](../../api-ref/grpc/Cloud/update.md) gRPC API call.

{% endlist %}