The Runpod Pulumi provider provides resources to interact with Runpod's native APIs.
Project description
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.
- Create a new Pulumi Go example:
pulumi new
Select either the Go template or Runpod's Go template.
-
Set your API keys using the config shown above.
-
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.
- 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,
};
- PULUMI UP Create your resources using the command below:
pulumi up
- 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file runpod_pulumi_infra-1.2.2.tar.gz
.
File metadata
- Download URL: runpod_pulumi_infra-1.2.2.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e607209c9971a630b4357c6bf6cfa1aebc4b6aba195c47bbeb7decc8d3533715 |
|
MD5 | c85016d2420b22d364f06dd957a2f30c |
|
BLAKE2b-256 | 189256e2b990f3e5700120c37fa5c4a5975f34e081f8056f2760019a10799a01 |