Skip to main content

pulumi-nebius

pulumi-nebius provider

Pulumi Python SDK for Nebius AI Cloud, generated from the Nebius Terraform provider via pulumi package add terraform-provider. Currently pinned to provider version 0.6.37.

No Go toolchain required — the Nebius Terraform binary is downloaded automatically by the pulumi-terraform-provider runtime plugin on first use.

Prerequisites

  • Python 3.9+
  • Pulumi CLI ≥ 3.165.0
  • An active Python virtual environment

Installation

1. Activate your venv

source .venv/bin/activate        # from repo root

2. Install the Pulumi runtime plugin (one-time per machine)

pulumi plugin install resource terraform-provider 1.2.1

3. Install the Python SDK

pip install -e pulumi-nebius/sdk

Or from inside pulumi-nebius/:

make install

Verify

python -c "import pulumi_nebius as n; print(n.Mk8sV1Cluster)"

Usage

import pulumi_nebius as nebius

provider = nebius.Provider(
    "nebius",
    service_account_id="<sa-id>",
    service_account_authorized_key=open("sa-key.json").read(),
)

network = nebius.VpcV1Network(
    "network",
    metadata=nebius.ResourceMetadataArgs(
        parent_id="<project-id>",
        name="my-network",
    ),
    opts=pulumi.ResourceOptions(provider=provider),
)

subnet = nebius.VpcV1Subnet(
    "subnet",
    metadata=nebius.ResourceMetadataArgs(
        parent_id="<project-id>",
        name="my-subnet",
    ),
    spec=nebius.VpcV1SubnetSpecArgs(
        network_id=network.id,
        cidr_blocks=["10.0.0.0/24"],
    ),
    opts=pulumi.ResourceOptions(provider=provider),
)

cluster = nebius.Mk8sV1Cluster(
    "cluster",
    metadata=nebius.ResourceMetadataArgs(
        parent_id="<project-id>",
        name="my-cluster",
    ),
    spec=nebius.Mk8sV1ClusterSpecArgs(
        k8s_version="1.30",
        control_plane=nebius.Mk8sV1ClusterSpecControlPlaneArgs(
            subnet_id=subnet.id,
        ),
    ),
    opts=pulumi.ResourceOptions(provider=provider),
)

Key resource classes:

Class Description
nebius.Provider Provider configuration (auth)
nebius.Mk8sV1Cluster Managed Kubernetes cluster
nebius.Mk8sV1NodeGroup Node group within a cluster
nebius.VpcV1Network VPC network
nebius.VpcV1Subnet Subnet
nebius.VpcV1SecurityGroup Security group
nebius.IamV1ServiceAccount IAM service account
nebius.IamV1AccessPermit IAM role binding
nebius.ComputeV1Instance Compute instance
nebius.ComputeV1GpuCluster GPU cluster

Regenerating the SDK

To regenerate after an upstream Terraform provider release:

# Pin to a specific version and regenerate
make sdk VERSION=0.6.38

# Or just regenerate from the current pinned version
make sdk

Automated updates

The pulumi-nebius provider workflow:

  • Checks the Terraform registry for a newer version every Monday at 06:00 UTC, and opens a PR that bumps Makefile and regenerates sdk/ if one is found.
  • Can also be triggered manually via Actions → pulumi-nebius provider → Run workflow, with an optional version input to bump to a specific release.
  • Validates that the generated SDK imports cleanly on every push to main that touches pulumi-nebius/**.

Publishing to PyPI

pip install pulumi-nebius is served from PyPI as a normal pre-built package (in addition to the zero-install pulumi package add terraform-provider registry.terraform.io/nebius/nebius path, which generates an SDK locally and needs nothing published at all).

Automated

  1. The pulumi-nebius provider workflow bumps Makefile/regenerates sdk/ and opens a PR (as described above).
  2. Merging that PR to main triggers the tag-release job, which tags pulumi-nebius-v<version> and cuts a GitHub Release — but only if that tag doesn't already exist, so it's a no-op on unrelated pushes.
  3. The release publish fires pulumi-nebius-pypi-publish.yml, which builds sdk/ and uploads it to PyPI via OIDC trusted publishing — no long-lived API token is stored in this repo.

One-time setup (needs PyPI/GitHub account access, not code):

  • On PyPI (and optionally TestPyPI) → project settings → Trusted Publishers → add a publisher pointing at this repo, workflow pulumi-nebius-pypi-publish.yml, environment pypi (or testpypi).
  • In GitHub → repo Settings → Environments, create the pypi environment (and testpypi if used) and optionally add required reviewers there for a manual approval gate before anything actually publishes.

Manual / local

make dist                                   # build sdist + wheel into sdk/dist/
PYPI_API_TOKEN=pypi-... make publish-test   # upload to TestPyPI
PYPI_API_TOKEN=pypi-... make publish        # upload to PyPI

scripts/build.sh and scripts/publish.sh back these targets directly if you want more control. You can also trigger a TestPyPI dry run from CI without cutting a release: Actions → pulumi-nebius PyPI publish → Run workflow → target: testpypi.

Because make sdk regenerates sdk/ from scratch on every run, PyPI-facing metadata (license, authors, classifiers, this repo's URLs, the long description) can't live in the generated pyproject.toml directly — scripts/patch_pyproject.py re-applies it after each regeneration and is called automatically as part of make sdk.

Directory layout

pulumi-nebius/
├── Makefile          # sdk / install / bump targets
├── README.md         # this file
└── sdk/              # generated Python package (committed)
    ├── pyproject.toml
    └── pulumi_nebius/
        ├── pulumi-plugin.json   # tells Pulumi which runtime plugin to use
        ├── mk8s_v1_cluster.py
        ├── mk8s_v1_node_group.py
        ├── vpc_v1_*.py
        ├── iam_v1_*.py
        └── ...                  # 100+ resource & data-source modules

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pulumi_nebius-0.6.37.tar.gz (405.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pulumi_nebius-0.6.37-py3-none-any.whl (568.7 kB view details)

Uploaded Python 3

File details

Details for the file pulumi_nebius-0.6.37.tar.gz.

File metadata

  • Download URL: pulumi_nebius-0.6.37.tar.gz
  • Upload date:
  • Size: 405.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pulumi_nebius-0.6.37.tar.gz
Algorithm Hash digest
SHA256 04ac538f9a440baeea722d41c7886a2c80acc0f0b15dafb6aeb8b8967d2d48f5
MD5 b30648ac9453a15d2cff788aafd85f40
BLAKE2b-256 acec4c7b56edd10b060b52ee93d34e664c6e13f88d3272336eea08db46231d91

See more details on using hashes here.

Provenance

The following attestation bundles were made for pulumi_nebius-0.6.37.tar.gz:

Publisher: pulumi-nebius-pypi-publish.yml on hrishin/pulumi-providers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pulumi_nebius-0.6.37-py3-none-any.whl.

File metadata

  • Download URL: pulumi_nebius-0.6.37-py3-none-any.whl
  • Upload date:
  • Size: 568.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pulumi_nebius-0.6.37-py3-none-any.whl
Algorithm Hash digest
SHA256 2c732d7c9dff8a2e7108499695ef2091f28726aaa51d56ac295567db78fe5db5
MD5 98804e1a1fb4f624d922f9620e7944a1
BLAKE2b-256 7dfdff3c8ac8c38d783c614d3964d1d5e788316f6a8a188da94f3361696d9c5c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pulumi_nebius-0.6.37-py3-none-any.whl:

Publisher: pulumi-nebius-pypi-publish.yml on hrishin/pulumi-providers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page