Creating a metadata catalog
A folder is a space where Yandex Cloud resources are created and grouped.
-
In the management console
, in the top panel, click or and select the cloud. -
To the right of the cloud name, click
. -
Select
Create folder.
-
Give your 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.
-
Optionally, specify the description for your folder.
-
Select Create a default network. This will create a network with subnets in each availability zone. Within this network, you will also have a default security group, within which all network traffic will be allowed.
-
Click Create.

If you do not have the Yandex Cloud CLI yet, install and initialize it.
-
Read the
create foldercommand description:yc resource-manager folder create --help -
Create a new folder:
-
with a name and without a description:
yc resource-manager folder create \ --name new-folderThe 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:
yc resource-manager folder create \ --name new-folder \ --description "my first folder with description"
-
If you do not have Terraform yet, install it and configure the Yandex Cloud provider.
To manage infrastructure using Terraform under a service account or user accounts (a Yandex account, a federated account, or a local user), authenticate using the appropriate method.
-
In the configuration file, describe the resources you want to create:
-
cloud_id: ID of the cloud 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:
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_folderresource in Terraform, see this provider guide. -
-
Make sure the configuration files are correct.
-
In the command line, navigate to the directory where you created the configuration file.
-
Check the configuration using this command:
terraform validateIf the configuration is valid, you will get this message:
Success! The configuration is valid. -
Run this command:
terraform planIf the configuration is correct, the terminal will display a list of the resources and their settings. Otherwise, Terraform will show any detected errors.
-
-
Deploy the cloud resources.
-
If the configuration is correct, run this command:
terraform apply -
Confirm creating the resources: type
yesand press Enter.This will create the folder in the specified cloud. You can check the new folder and its settings using the management console
or this CLI command:yc resource-manager folder list
-
To create a folder, use the create REST API method for the Folder resource or the FolderService/Create gRPC API call.