Skip to main content
To use Terraform resources and data sources provided by Nebius AI Cloud, configure your Terraform configuration to use the provider.

How to install the provider

  1. Create a working directory:
    mkdir nebius-terraform-quickstart
    cd nebius-terraform-quickstart
    
  2. Create the following terraform.tf file. It lists the providers required for configuration — in this case, the Nebius AI Cloud provider.
    terraform {
      required_providers {
        nebius = {
          source  = "nebius/nebius"
          version = ">= 0.6.8"
        }
      }
    }
    
  3. Initialize the working directory — this will download and install the provider:
    terraform init
    
After that, create Terraform manifests with Nebius AI Cloud resources in the initialized working directory.

How to migrate from the Nebius registry to the Terraform Registry

Prior to publishing the provider for Terraform in the Terraform Registry, Nebius distributed the provider (versions 0.5.x) solely through its own custom registries, at source addresses terraform-provider-nebius.storage.ai.nebius.cloud/nebius/nebius and terraform-provider.storage.eu-north1.nebius.cloud/nebius/nebius. If your Terraform configuration uses one of these source addresses, you need to upgrade the provider in it to a corresponding 0.6.y version in the Terraform Registry.
Migrating to the Terraform Registry doesn’t affect the existing resources that your configuration manages.
To check and migrate your configuration, perform the following steps in the working directory:
  1. Find terraform.tf or another file that contains the top-level terraform block.
  2. In the required_providers block, find the nebius provider and check its source address in source:
    terraform {
      required_providers {
        nebius = {
          source  = "terraform-provider.storage.eu-north1.nebius.cloud/nebius/nebius"
          version = ">= 0.5.210"
        }
      }
    }
    
    • source = "terraform-provider.storage.eu-north1.nebius.cloud/nebius/nebius" or source = "terraform-provider-nebius.storage.ai.nebius.cloud/nebius/nebius": follow the next steps to migrate the configuration.
    • source = "nebius/nebius": the configuration is already migrated, no action is required.
  3. Upgrade to the most recent 0.5.x version:
    1. Check the most recent 0.5.x version in the release notes.
    2. In terraform.tf, update the version constraint:
      terraform {
        required_providers {
          nebius = {
            source  = "terraform-provider.storage.eu-north1.nebius.cloud/nebius/nebius"
            version = ">= 0.5.210"
            version = ">= 0.5.218"
          }
        }
      }
      
    3. Re-initialize the working directory:
      terraform init -upgrade
      
  4. Replace the source address and upgrade from 0.5.x to 0.6.y:
    1. In terraform.tf, update the source address and the version constraint:
      terraform {
        required_providers {
          nebius = {
            source  = "terraform-provider.storage.eu-north1.nebius.cloud/nebius/nebius"
            version = ">= 0.5.218"
            source  = "nebius/nebius"
            version = ">= 0.6.9"
          }
        }
      }
      
      To find the corresponding 0.6.y version, use the following mapping:
      • 0.5.218 → 0.6.9
      • 0.5.217 → 0.6.8
      • etc.
      Although it’s allowed to omit the version constraint, Terraform strongly recommends specifying it explicitly.
    2. In the root module or workspace that owns the Terraform state, replace the provider address in the state:
      terraform state replace-provider \
        terraform-provider.storage.eu-north1.nebius.cloud/nebius/nebius \
        registry.terraform.io/nebius/nebius
      terraform state replace-provider \
        terraform-provider-nebius.storage.ai.nebius.cloud/nebius/nebius \
        registry.terraform.io/nebius/nebius
      
      The commands back up the state file, terraform.tfstate, before updating it.
    3. Re-initialize the working directory:
      terraform init -upgrade
      
  5. Check that the configuration uses the new source address for the provider:
    terraform providers
    terraform plan
    
    The outputs must only reference registry.terraform.io/nebius/nebius. If they still reference terraform-provider.storage.eu-north1.nebius.cloud/nebius/nebius or terraform-provider-nebius.storage.ai.nebius.cloud/nebius/nebius, perform the migration on nested modules that still use old source addresses for the provider.
  6. If your configuration is under version control, commit the changes that you made to it, including the updated dependency lock file (.terraform.lock.hcl).

See also