What is Terraform?
Terraform
With Terraform, you can quickly create a cloud infrastructure in Nebius AI and manage it using configuration files. They store the infrastructure descriptions written in machine- and human-friendly configuration language. Here is an example:
resource "nebius_compute_disk" "default" {
name = "disk-name"
type = "network-ssd"
zone = "eu-north1-c"
size = 50
}
Terraform and its providers are distributed under the Business Source License
Use cases
Terraform simplifies deploying, managing, and orchestrating cloud resources, thus helping you to:
- Speed up cloud management lifecycle. You can create resources, scale them, and reproduce them in different environments by running a script rather than repeating the actions in a user interface.
- Reduce human errors that can arise with many repetitive actions.
- Concentrate on your tasks rather than study a new technology, as the understanding of Terraform's principles is enough to build the whole infrastructure.
- Manage changes without affecting the broader infrastructure. If you change the configuration files, Terraform automatically determines which part of your configuration is already deployed and what should be added or removed.
Terraform workflow
The Terraform workflow consists of three steps:
- You define cloud resources. For example, virtual machines, disks that should be attached to them, cloud networks and subnets that they should belong to.
- Terraform creates an execution plan with the infrastructure it will create, update, or destroy. If the configuration contains any errors, Terraform will point them out.
- Terraform performs the planned operations in the correct order, taking into consideration any dependencies and exceptions. For example, it will not assign
resource-manager.clouds.owner
role to the system group.
Nebius AI Terraform provider
To manage Nebius AI resources, you can use the Nebius AI Terraform provider. For each type of cloud resource, the provider contains:
- A Terraform resource type that you can use to create and update resources. For example, the resource type for virtual machines is nebius_compute_instance
. - A data source that you can use to get information about existing resources. For example, the data source for virtual machines is nebius_compute_instance
.
For more information about the provider resources, see the Nebius AI Terraform provider reference