Come join Pulumi for the industry's first Cloud Engineering Summit! October 7–8. Save Your Spot

Rancher2

The Rancher2 provider for Pulumi can be used to provision any of the cloud resources available via Rancher. The Rancher2 provider must be configured with credentials to deploy and update resources for Rancher.

See the full API documentation for complete details of the available Rancher2 provider APIs.

Setup

The Rancher2 provider supports several options for providing access to Rancher credentials. See the Rancher2 setup page for details.

Example

const rancher2 = require("@pulumi/rancher2")

const myUser = new rancher2.User("my-user", {
  name: "Foo user",
  username: "foo",
  password: "initialPassw0rd",
  enabled: true,
});
import * as rancher2 from "@pulumi/rancher2";

const myUser = new rancher2.User("my-user", {
  name: "Foo user",
  username: "foo",
  password: "initialPassw0rd",
  enabled: true,
});
import pulumi_rancher2 as rancher2

user = rancher2.User("my-user",
  name="Foo user",
  username="foo",
  password="initialPassw0rd",
  enabled=true
)
import (
  "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
  rancher2 "github.com/pulumi/pulumi-rancher2/sdk/v2/go/rancher2"
)

user, _ := rancher2.NewUser(ctx, "my-user", &rancher2.UserArgs{
  Name:     pulumi.String("Foo user"),
  Username: pulumi.String("foo"),
  Password: pulumi.String("initialPassw0rd"),
  Enabled:  pulumi.Bool(true),
})
using System.Collections.Generic;
using System.Threading.Tasks;
using Pulumi;
using Pulumi.Rancher2;

class Program
{
    static Task Main() =>
        Deployment.Run(() => {
            var user = new User("my-user", new UserArgs
            {
                Name = "Foo user",
                Username = "foo",
                Password = "initialPassw0rd",
                Enabled = true,
            });
        });
}

Libraries

The following packages are available in packager managers:

The Rancher2 provider is open source and available in the pulumi/pulumi-rancher2 repo.