1. Packages
  2. Rancher2
Rancher 2 v6.1.0 published on Tuesday, Mar 12, 2024 by Pulumi

Rancher2

rancher2 logo
Rancher 2 v6.1.0 published on Tuesday, Mar 12, 2024 by Pulumi

    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.

    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/v3/go/pulumi"
    	rancher2 "github.com/pulumi/pulumi-rancher2/sdk/v3/go/rancher2"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		user, err := rancher2.NewUser(ctx, "my-user", &rancher2.UserArgs{
    			Name:     pulumi.String("Foo user"),
    			Username: pulumi.String("foo"),
    			Password: pulumi.String("initialPassw0rd"),
    			Enabled:  pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    
    		return nil
    	})
    }
    
    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,
                });
            });
    }
    
    rancher2 logo
    Rancher 2 v6.1.0 published on Tuesday, Mar 12, 2024 by Pulumi