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

# Creating a metadata catalog

A _folder_ is a space where Yandex Cloud resources are created and [grouped](../../concepts/resources-hierarchy.md).

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), in the top panel, click ![image](../../../_assets/console-icons/layout-side-content-left.svg) or ![image](../../../_assets/console-icons/chevron-down.svg) and select the [cloud](../../concepts/resources-hierarchy.md#cloud).
  1. To the right of the cloud name, click ![image](../../../_assets/console-icons/ellipsis.svg).
  1. Select ![image](../../../_assets/console-icons/plus.svg) **Create folder**.
  
     ![create-folder1](../../../_assets/resource-manager/create-folder-1.png)
  
  1. Give your [folder](../../concepts/resources-hierarchy.md#folder) a 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. Optionally, specify the description for your folder.
  1. Select **Create a default network**. This will create a [network](../../../vpc/concepts/network.md#network) with subnets in each availability zone. Within this network, you will also have a [default security group](../../../vpc/concepts/security-groups.md#default-security-group), within which all network traffic will be allowed.
  1. Click **Create**.
  
     ![create-folder2](../../../_assets/resource-manager/create-folder-2.png)

- CLI {#cli}

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

  1. Read the `create folder` command description:

      ```bash
      yc resource-manager folder create --help
      ```

  2. Create a new folder:

      * with a name and without a description:
          ```bash
          yc resource-manager folder create \
            --name new-folder
          ```

          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.

      * with a name and description:

          ```bash
          yc resource-manager folder create \
            --name new-folder \
            --description "my first folder with description"
          ```

- 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.

  1. In the configuration file, describe the resources you want to create:

     * `cloud_id`: [ID of the cloud](../cloud/get-id.md) to create the folder in. This is an optional setting. It defaults to the value specified in the provider settings.
     * `name`: Name of the new folder. This is a required setting. 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.

     * `description`: Folder description. This is an optional setting.

     Here is an example of the configuration file structure:

     ```hcl
     resource "yandex_resourcemanager_folder" "folder1" {
       cloud_id    = "<cloud_ID>"
       name        = "<name_of_the_new_folder>"
       description = "<folder_description>"
     }
     ```

     For more on the properties of the `yandex_resourcemanager_folder` resource in Terraform, see [this provider guide](../../../terraform/resources/resourcemanager_folder.md).

  1. Make sure the configuration files are correct.

     1. In the command line, navigate to the directory where you created the configuration file.

     1. Check the configuration using this command:

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

     1. Run this command:

        ```
        terraform plan
        ```

        If the configuration is correct, the terminal will display a list of the resources and their settings. Otherwise, Terraform will show any detected errors. 

  1. Deploy the cloud resources.

     1. If the configuration is correct, run this command:

        ```
        terraform apply
        ```

     1. Confirm creating the resources: type `yes` and press **Enter**.

        This will create the folder in the specified cloud. You can check the new folder and its settings using the [management console](https://console.yandex.cloud) or this [CLI](../../../cli/quickstart.md) command:

        ```
        yc resource-manager folder list
        ```

- API {#api}

  To create a folder, use the [create](../../api-ref/Folder/create.md) REST API method for the [Folder](../../api-ref/Folder/index.md) resource or the [FolderService/Create](../../api-ref/grpc/Folder/create.md) gRPC API call.

{% endlist %}