Skip to main content

title: Runpod meta_desc: Provides an overview of the Runpod Provider for Pulumi. layout: package

The Runpod provider for Pulumi can be used to provision Runpod resources. The Runpod provider must be configured with Runpod's API keys to deploy and update resources in Runpod.

Config

To begin with, please set your runpod API key to use with Pulumi.

  pulumi config set --secret runpod:token

Example

This is an example of how to deploy it over Golang. We also serve pulumi over Typescript and Python. For more examples, please navigate to the examples directory or the documents inside docs. If you have any problems in doing so, please contact support@runpod.io.

  1. Create a new Pulumi Go example:
    pulumi new

Select either the Go template or Runpod's Go template.

  1. Set your API keys using the config shown above.

  2. Install the official Go package:

    go get github.com/runpod/pulumi-runpod-native/sdk/go/runpod@v1.1.8

Replace the version above to any that you want. We advise you to pin a certain version as there will be fewer breaking changes.

  1. Use this example as a simple building guide for your example project:
    import * as pulumi from "@pulumi/pulumi";
    import * as runpod from "@runpod-infra/pulumi";

    const testNetworkStorage = new runpod.NetworkStorage("testNetworkStorage", {
        name: "testStorage1",
        size: 20,
        dataCenterId: "US-NJ",
    });
    const myRandomPod = new runpod.Pod("myRandomPod", {
        cloudType: "ALL",
        networkVolumeId: testNetworkStorage.networkStorage.apply(networkStorage => networkStorage.id),
        gpuCount: 1,
        volumeInGb: 50,
        containerDiskInGb: 50,
        minVcpuCount: 2,
        minMemoryInGb: 15,
        gpuTypeId: "NVIDIA GeForce RTX 3070",
        name: "RunPod Pytorch",
        imageName: "runpod/pytorch",
        dockerArgs: "",
        ports: "8888/http",
        volumeMountPath: "/workspace",
        env: [{
            key: "JUPYTER_PASSWORD",
            value: "rns1hunbsstltcpad22d",
        }],
    });
    export const pod = {
        value: myRandomPod.pod,
    };
    export const networkStorage = {
        value: testNetworkStorage.networkStorage,
    };
  1. PULUMI UP Create your resources using the command below:
    pulumi up
  1. PULUMI DOWN If you want to remove your resources, you can use the command below:
    pulumi down

If you have any issues, please feel free to create an issue or reach out to us directly at support@runpod.io.

Note: For examples in Go and Python, please visit the documentation inside the docs directory or click here.

Release files for runpod-pulumi-infra 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for runpod-pulumi-infra 1.2.2
File Size Uploaded
runpod_pulumi_infra-1.2.2.tar.gz 15.2 kB Details

Release files / runpod_pulumi_infra-1.2.2.tar.gz

Download URL runpod_pulumi_infra-1.2.2.tar.gz
Size 15.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e607209c9971a630b4357c6bf6cfa1aebc4b6aba195c47bbeb7decc8d3533715
BLAKE2b-256 checksum
How to use checksums
189256e2b990f3e5700120c37fa5c4a5975f34e081f8056f2760019a10799a01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

1.2.2 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page