Prerequisites
The prerequisites for this guide depend on the interface that you use.- Web console
- CLI
- Terraform
- Go SDK
- Python SDK
- JavaScript SDK
Make sure you are in a group that has the
admin role within your tenant or project; for example, the default admins group. You can check this in the Administration → IAM section of the web console.- Install and configure the Nebius AI Cloud CLI.
Use one profile per projectCreate a separate Nebius AI Cloud CLI profile for each project to ensure correct region-specific configuration.
- Make sure you are in a group that has the
adminrole within your tenant or project; for example, the defaultadminsgroup. You can check this in the Administration → IAM section of the web console.
Install and configure the Nebius AI Cloud provider for Terraform.
- Install and initialize the Nebius SDK for Go.
-
Make sure you are in a group that has the
adminrole within your tenant or project; for example, the defaultadminsgroup. You can check this in the Administration → IAM section of the web console.
- Install and initialize the Nebius SDK for Python.
-
Make sure you are in a group that has the
adminrole within your tenant or project; for example, the defaultadminsgroup. You can check this in the Administration → IAM section of the web console.
- Install and initialize the Nebius SDK for JavaScript.
-
Make sure you are in a group that has the
adminrole within your tenant or project; for example, the defaultadminsgroup. You can check this in the Administration → IAM section of the web console.
How to create a project
- Web console
- CLI
- Terraform
- Go SDK
- Python SDK
- JavaScript SDK
- In the web console, expand the list of projects.
-
Click
Create project.
-
In the project creation form, specify the project settings:
- Select the tenant and region. You cannot change them later.
- Enter the name of the new project. The name should be unique in the tenant. You can edit it later.
- Click Create project.
Create a project:The command contains the following parameters:
nebius iam v2 project create \
--parent-id <tenant_ID> \
--name <project_name> \
--region <region_name>
-
--parent-id: Tenant ID. -
--name: Name of the project. -
--region: Name of the region where the project is created.You can only create a project via the Nebius AI Cloud CLI in public regions. If you try to create a project in a private region, you receive an error.
-
Create the following configuration file:
The resource contains the following parameters:
resource "nebius_iam_v2_project" "<project_name>" { name = "<project_name>" parent_id = "<tenant_ID>" region = "<region_name>" } -
Check that the configuration is correct:
terraform validate -
Apply the changes:
terraform apply
createProjectService := sdk.Services().IAM().V2().
Project()
projectCreateOperation, err := createProjectService.Create(
ctx,
&iamv2.CreateProjectRequest{
Metadata: &common.ResourceMetadata{
ParentId: "<tenant_ID>",
Name: "<project_name>",
},
Spec: &iamv2.ProjectSpec{
Region: "<region_name>",
},
},
)
if err != nil {
return err
}
if _, err = projectCreateOperation.Wait(ctx); err != nil {
return err
}
-
Metadata.ParentId: Tenant ID. -
Metadata.Name: Name of the project. -
Spec.Region: Name of the region where the project is created.You can only create a project via the Nebius AI Cloud SDK in public regions. If you try to create a project in a private region, you receive an error.
create_project_service = ProjectServiceClient(sdk)
project_create_operation = await create_project_service.create(
CreateProjectRequest(
metadata=ResourceMetadata(
parent_id="<tenant_ID>",
name="<project_name>",
),
spec=ProjectSpec(region="<region_name>"),
),
)
await project_create_operation.wait()
-
metadata.parent_id: Tenant ID. -
metadata.name: Name of the project. -
spec.region: Name of the region where the project is created.You can only create a project via the Nebius AI Cloud SDK in public regions. If you try to create a project in a private region, you receive an error.
const createProjectService = new ProjectService(sdk);
const projectCreateOperation =
await createProjectService.create(
CreateProjectRequest.create({
metadata: ResourceMetadata.create({
parentId: "<tenant_ID>",
name: "<project_name>",
}),
spec: ProjectSpec.create({
region: "<region_name>",
}),
}),
).result;
await projectCreateOperation.wait();
-
metadata.parentId: Tenant ID. -
metadata.name: Name of the project. -
spec.region: Name of the region where the project is created.You can only create a project via the Nebius AI Cloud SDK in public regions. If you try to create a project in a private region, you receive an error.
How to get a project ID
- Web console
- CLI
- Terraform
- Go SDK
- Python SDK
- JavaScript SDK
- In the web console, expand the list of projects.
- Next to the project name, click
→
Copy project ID.
Run the following command:In this command, specify the parameters:
nebius iam v2 project get-by-name --parent-id <tenant_ID> --name <project_name>
-
--parent-id: Tenant ID where the project is created. -
--name: Name of the project. If you do not know the exact name of the project, use thelistcommand to view the list of all projects of your tenant:nebius iam v2 project list --parent-id <tenant_ID>
In your Terraform working directory, get the attributes of your project using its name:The
terraform state show nebius_iam_v2_project.<project_name>
id attribute in the output contains the project ID.If you do not know the exact name of the project, list all the resources from your Terraform state file (.tfstate) to find the project name:terraform state list
getProjectService := sdk.Services().IAM().V2().
Project()
project, err := getProjectService.GetByName(
ctx,
&iamv2.GetProjectByNameRequest{
ParentId: "<tenant_ID>",
Name: "<project_name>",
},
)
if err != nil {
return err
}
projectID := project.GetMetadata().GetId()
if projectID == "" {
return errors.New("project ID is missing")
}
fmt.Println(projectID)
-
ParentId: Tenant ID where the project is created. -
Name: Name of the project. If you don’t know the exact name of the project, list all projects of your tenant by usingsdk.Services().IAM().V2().Project().List().
Metadata.Id.get_project_service = ProjectServiceClient(sdk)
project = await get_project_service.get_by_name(
GetProjectByNameRequest(
parent_id="<tenant_ID>",
name="<project_name>",
),
)
project_id = project.metadata.id
print(project_id)
-
parent_id: Tenant ID where the project is created. -
name: Name of the project. If you don’t know the exact name of the project, list all projects of your tenant by usingProjectServiceClient(sdk).list().
metadata.id.const getProjectService = new ProjectService(sdk);
const project = await getProjectService.getByName(
GetProjectByNameRequest.create({
parentId: "<tenant_ID>",
name: "<project_name>",
}),
);
const projectId = project.metadata?.id;
if (!projectId) {
throw new Error("project ID is missing");
}
console.log(projectId);
-
parentId: Tenant ID where the project is created. -
name: Name of the project. If you don’t know the exact name of the project, list all projects of your tenant by usingnew ProjectService(sdk).list().
metadata.id.How to edit a project
For an existing project, you can only edit the name. You cannot move a project to another region or tenant. To edit the project name:- Web console
- CLI
- Terraform
- Go SDK
- Python SDK
- JavaScript SDK
- In the web console, expand the list of projects.
- In the line of the required project, click
→ Configure.
- Enter a new value in the Name field.
- Click Save.
Run the following command:In this command, specify the parameters:
nebius iam v2 project edit \
--id <project_ID>
[--editor '<editor_terminal_name> --wait'] \
[--format <json|yaml>]
-
--id: ID of the project. -
--editor(optional): Editor name. It can be any editor installed on your machine, such asnanooremacs. To check which of the popular editors are installed, run the following command:For an editor that opens in a separate window, add thewhich code emacs gedit micro nano subl vi vim--waitparameter to its name to ensure that the command waits until you close the editor. -
--format(optional): Data format. Onlyjsonandyamlvalues are accepted. By default, YAML format is used.
- In the configuration file, edit the
nameargument of the correspondingnebius_iam_v2_projectresource. - Check that the configuration is correct:
terraform validate - Apply the changes:
terraform apply
The SDK has no partial update call, so to change the project name, get the project, modify In the code, set the following parameters:
Metadata.Name, then send the updated metadata and spec back:projectService := sdk.Services().IAM().V2().
Project()
projectForUpdate, err := projectService.Get(
ctx,
&iamv2.GetProjectRequest{Id: "<project_ID>"},
)
if err != nil {
return err
}
projectForUpdate.GetMetadata().Name = "<new_project_name>"
updateProjectOperation, err := projectService.
Update(
ctx,
&iamv2.UpdateProjectRequest{
Metadata: projectForUpdate.GetMetadata(),
Spec: projectForUpdate.GetSpec(),
},
)
if err != nil {
return err
}
if _, err = updateProjectOperation.Wait(ctx); err != nil {
return err
}
IdinGetProjectRequest: ID of the project.Metadata.Name: New name of the project.
The SDK has no partial update call, so to change the project name, get the project, modify In the code, set the following parameters:
metadata.name, then send the updated metadata and spec back:project_service = ProjectServiceClient(sdk)
project_for_update = await project_service.get(
GetProjectRequest(id="<project_ID>"),
)
project_for_update.metadata.name = "<new_project_name>"
update_project_operation = (
await project_service.update(
UpdateProjectRequest(
metadata=project_for_update.metadata,
spec=project_for_update.spec,
),
)
)
await update_project_operation.wait()
idinGetProjectRequest: ID of the project.metadata.name: New name of the project.
The SDK has no partial update call, so to change the project name, get the project, modify In the code, set the following parameters:
metadata.name, then send the updated metadata and spec back:const projectService = new ProjectService(sdk);
const projectForUpdate = await projectService.get(
GetProjectRequest.create({id: "<project_ID>"}),
);
projectForUpdate.metadata.name = "<new_project_name>";
const updateProjectOperation =
await projectService.update(
UpdateProjectRequest.create({
metadata: projectForUpdate.metadata,
spec: projectForUpdate.spec,
}),
).result;
await updateProjectOperation.wait();
idinGetProjectRequest: ID of the project.metadata.name: New name of the project.
How to delete a project
Before you delete a project, make sure to remove all resources from it. You can only delete an empty project.- Web console
- CLI
- Terraform
- Go SDK
- Python SDK
- JavaScript SDK
- In the web console, expand the list of projects.
- In the line of the required project, click
→ Delete project.
Delete the project:
nebius iam v2 project delete --id <project_ID>
- Remove the corresponding
nebius_iam_v2_projectresource from the configuration file. - Check that the configuration is correct:
terraform validate - Apply the changes:
terraform apply
Delete the project:In the code, set
deleteProjectService := sdk.Services().IAM().V2().
Project()
deleteProjectOperation, err := deleteProjectService.Delete(
ctx,
&iamv2.DeleteProjectRequest{Id: "<project_ID>"},
)
if err != nil {
return err
}
if _, err = deleteProjectOperation.Wait(ctx); err != nil {
return err
}
Id to the ID of the project.Delete the project:In the code, set
delete_project_service = ProjectServiceClient(sdk)
delete_project_operation = await delete_project_service.delete(
DeleteProjectRequest(id="<project_ID>"),
)
await delete_project_operation.wait()
id to the ID of the project.Delete the project:In the code, set
const deleteProjectService = new ProjectService(sdk);
const deleteProjectOperation =
await deleteProjectService.delete(
DeleteProjectRequest.create({id: "<project_ID>"}),
).result;
await deleteProjectOperation.wait();
id to the ID of the project.