Configure the Nebius AI Terraform provider
Use a service account to flexibly configure access rights for resources using Terraform.
You can also access Terraform from your Google account or a federated account, but this method is less secure.
Add the credentials to the environment variables:
export NCP_TOKEN=$(ncp iam create-token)
export NCP_CLOUD_ID=$(ncp config get cloud-id)
export NCP_FOLDER_ID=$(ncp config get folder-id)
Where:
NCP_TOKEN
: IAM token.NCP_CLOUD_ID
: Cloud ID.NCP_FOLDER_ID
: Folder ID.
$Env:NCP_TOKEN=$(ncp iam create-token)
$Env:NCP_CLOUD_ID=$(ncp config get cloud-id)
$Env:NCP_FOLDER_ID=$(ncp config get folder-id)
Where:
NCP_TOKEN
: IAM token.NCP_CLOUD_ID
: Cloud ID.NCP_FOLDER_ID
: Folder ID.
Note
The IAM token lifetime doesn't exceed 12 hours, but we recommend requesting the token more often, like once per hour.
After that you are set to configure a Terraform provider.
Note
These settings apply to Terraform 0.13
and higher. It's recommended to use the latest stable version of Terraform.
-
Add the following sections at the top of the
.tf
configuration file:terraform { required_providers { nebius = { source = "terraform-registry.storage.ai.nebius.cloud/nebius/nebius" version = ">= 0.6.0" # Optional } } required_version = ">= 0.13" } provider "nebius" { zone = "<default availability zone>" }
Where:
-
source
: Provider's global source address . -
version
: Provider's version. Optional parameter. -
required_version
: The minimum version of Terraform the provider is compatible with. -
provider
: The provider name. -
endpoint
: Domain name and port for requests to the Nebius AI API:api.ai.nebius.cloud:443
. -
storage_endpoint
: Endpoint for managing Object Storage resources:storage.ai.nebius.cloud
.
-
-
Run the
terraform init
command in the folder containing the.tf
configuration file. This command initializes the providers specified in the configuration files and allows you to work with the provider resources and data sources.
If the provider installation failed, create a support request indicating the provider name and version.