> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nebius.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Installing the Nebius AI Cloud provider for Terraform

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:

   ```bash theme={null}
   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.

   ```hcl theme={null}
   terraform {
     required_providers {
       nebius = {
         source  = "nebius/nebius"
         version = ">= 0.6.8"
       }
     }
   }
   ```

3. Initialize the working directory — this will download and install the provider:

   ```bash theme={null}
   terraform init
   ```

After that, create [Terraform manifests](/terraform-provider/reference/index) 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](https://registry.terraform.io/providers/nebius/nebius/latest), 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.

<Note>
  Migrating to the Terraform Registry doesn't affect the existing resources that your configuration manages.
</Note>

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`:

   ```hcl highlight={4} theme={null}
   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](/terraform-provider/reference/release-notes).

   2. In `terraform.tf`, update the version constraint:

      ```hcl theme={null}
      terraform {
        required_providers {
          nebius = {
            source  = "terraform-provider.storage.eu-north1.nebius.cloud/nebius/nebius"
            version = ">= 0.5.210" // [!code --]
            version = ">= 0.5.218" // [!code ++]
          }
        }
      }
      ```

   3. Re-initialize the working directory:

      ```bash theme={null}
      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:

      ```hcl theme={null}
      terraform {
        required_providers {
          nebius = {
            source  = "terraform-provider.storage.eu-north1.nebius.cloud/nebius/nebius" // [!code --]
            version = ">= 0.5.218" // [!code --]
            source  = "nebius/nebius" // [!code ++]
            version = ">= 0.6.9" // [!code ++]
          }
        }
      }
      ```

      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:

      ```bash theme={null}
      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:

      ```bash theme={null}
      terraform init -upgrade
      ```

5. Check that the configuration uses the new source address for the provider:

   ```bash theme={null}
   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

* [Getting started with the Terraform provider by Nebius AI Cloud](/terraform-provider/quickstart)
* [Authentication in the Nebius AI Cloud provider for Terraform](/terraform-provider/authentication)
