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 naming requirements are as follows:
- The name must be from 3 to 63 characters long.
- It may contain lowercase Latin letters, numbers, and hyphens.
- The first character must be a letter and the last character cannot be a hyphen.
-
If you have multiple organizations, select the one you need.
-
Click Create.
-
If you don't have Terraform, install it and configure the Yandex Cloud provider.
To activate the cloud, make sure to link it to your billing account. To do this, use the yandex_billing_cloud_binding
resource indicating the cloud in the cloud_id
field.
-
In the configuration file, describe the parameters of the resources you want to create:
resource "yandex_resourcemanager_cloud" "cloud1" { name = "<cloud_name>" organization_id = "<organization_ID>" } resource "yandex_billing_cloud_binding" "mycloud" { billing_account_id = "<billing_account_ID>" cloud_id = yandex_resourcemanager_cloud.cloud1.id }
Where:
-
name
: Cloud name. The naming requirements are as follows:- The name must be from 3 to 63 characters long.
- It may contain lowercase Latin letters, numbers, and hyphens.
- The first character must be a letter and the last character cannot be a hyphen.
-
organization_id
: Organization ID. Terraform allows you to create a cloud only for an existing organization. -
billing_account_id
: Billing account ID. -
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.