> ## 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.

# 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 0.6.y version in the Terraform Registry.

> [!NOTE]
>
> Migrating to the Terraform Registry doesn't affect the existing resources that your configuration manages.

## How to check your registry

To find out whether you need to migrate, check the source address of the provider 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"
       }
     }
   }
   ```

3. Depending on the source address, do one of the following:

   * `source = "nebius/nebius"`: the configuration already uses the Terraform Registry. No action is required, so you can stop here.
   * `source = "terraform-provider.storage.eu-north1.nebius.cloud/nebius/nebius"` or `source = "terraform-provider-nebius.storage.ai.nebius.cloud/nebius/nebius"`: the configuration uses a Nebius registry. Migrate it as described in [How to update your registry](#how-to-update-your-registry).

## How to update your registry

To migrate the configuration to the Terraform Registry, perform the following steps in the working directory:

1. Upgrade to the most recent 0.5.x version:

   1. Check the most recent 0.5.x version in the [release notes](https://docs.nebius.com/terraform-provider/reference/release-notes.md).

   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 = ">= <most_recent_0.5.x_version>" // [!code ++]
          }
        }
      }
      ```

   3. Re-initialize the working directory:

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

   4. Check that the configuration works with the new version:

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

      The plan must complete without errors before you replace the source address.

2. Replace the source address and upgrade from 0.5.x to the latest published version in the [Terraform Registry](https://registry.terraform.io/providers/nebius/nebius/latest):

   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 = ">= <most_recent_0.5.x_version>" // [!code --]
            source  = "nebius/nebius" // [!code ++]
            version = ">= <latest_version>" // [!code ++]
          }
        }
      }
      ```

      Specify the latest provider version published in the Terraform Registry.

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

3. Check that the configuration uses the new source address and still works:

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

   The plan must complete without errors. If the plan reports an error for a resource or an attribute, find the change that caused it under `BREAKING CHANGES` in the [releases](https://github.com/nebius/terraform-provider-nebius/releases) and update your configuration accordingly.

4. If your configuration is under version control, commit the changes that you made to it, including the updated dependency lock file (`.terraform.lock.hcl`).
