Creating a new cloud
At sign-up, a cloud named cloud-<Yandex_ID>
will be automatically created for you. After you link a billing account, you can create an additional cloud.
To create an additional cloud:
-
On the Yandex Cloud Billing
page, make sure your billing account is inACTIVE
orTRIAL_ACTIVE
status. If you do not have a billing account, create one or ask your administrator to assign you thebilling.accounts.member
role for a billing account. -
Go to the management console
. -
In the upper left corner next to the Search field, click
. In the window that opens:-
Enter a name for the cloud. The name should match the following format:
- It must be 2 to 63 characters long.
- It may contain lowercase Latin letters, numbers, and hyphens.
- It must start with a letter and cannot end with a hyphen.
-
If you have multiple organizations, select the one you need.
-
Click Create.
-
Note
To create a new cloud using the Yandex Cloud CLI, link the organization to a CLI profile.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
-
View the description of the create cloud command:
yc resource-manager cloud create --help
-
If you do not have a linked organization yet, link the one you want to create the cloud in to the CLI profile.
yc config set organization-id <organization_ID>
Where
<organization_ID>
is the ID of the organization to create the cloud in. -
To create the cloud, run this command:
yc resource-manager cloud create \ --name <cloud_name> \ --billing-account-id <billing_account_ID>
Where:
-
--name
: Name of the cloud you are creating. The name should match the following format:- It must be 2 to 63 characters long.
- It may contain lowercase Latin letters, numbers, and hyphens.
- It must start with a letter and cannot end with a hyphen.
-
--billing-account-id
: ID of the billing account to link the new cloud to.You can get the billing account ID in the Yandex Cloud Billing interface
under Account information on the billing account page.
Result:
done (4s) id: b1gbi30tq0m9******** created_at: "2024-12-10T09:25:22Z" name: my-new-cloud organization_id: bpfaidqca8vd********
-
If you don't have Terraform, install it and configure the Yandex Cloud provider.
Warning
To activate the cloud, make sure to link it to your billing account. Until then, the new cloud will remain in the Creating
status. To link the cloud to your billing account, use the yandex_billing_cloud_binding
resource and specify the cloud ID in the cloud_id
field.
-
In the Terraform configuration file, define the parameters of the resources you want to create:
# Creating a cloud resource "yandex_resourcemanager_cloud" "cloud1" { name = "<cloud_name>" organization_id = "<organization_ID>" } # Linking the cloud to the billing account resource "yandex_billing_cloud_binding" "mycloud" { billing_account_id = "<billing_account_ID>" cloud_id = yandex_resourcemanager_cloud.cloud1.id }
Where:
-
name
: Cloud name. The name should match the following format:- It must be 2 to 63 characters long.
- It may contain lowercase Latin letters, numbers, and hyphens.
- It must start with a letter and cannot end with a hyphen.
-
organization_id
: Organization ID. Terraform allows you to create a cloud only for an existing organization. -
billing_account_id
: ID of the billing account to link the new cloud to.You can get the billing account ID in the Yandex Cloud Billing
interface under Account information on the billing account page. -
cloud_id
: ID of the cloud to link to the billing account.
For more information about the
yandex_resourcemanager_cloud
andyandex_billing_cloud_binding
resource parameters in Terraform, see the relevant provider documentation . -
-
Create resources:
-
In the terminal, change to the folder where you edited the configuration file.
-
Make sure the configuration file is correct using the command:
terraform validate
If the configuration is correct, the following message is returned:
Success! The configuration is valid.
-
Run the command:
terraform plan
The terminal will display a list of resources with parameters. No changes are made at this step. If the configuration contains errors, Terraform will point them out.
-
Apply the configuration changes:
terraform apply
-
Confirm the changes: type
yes
in the terminal and press Enter.
-
This will create a cloud linked to your billing account in the organization. You can check the new cloud and its parameters in the management console
yc resource-manager cloud list
To create a cloud, use the create REST API method for the Cloud resource or the CloudService/Create gRPC API call.
Note
When you create a cloud, you are automatically given the owner role in this cloud.