Rancher2

Pulumi Official
Package maintained by Pulumi
v3.8.0 published on Tuesday, May 31, 2022 by Pulumi

ClusterRoleTemplateBinding

Provides a Rancher v2 Cluster Role Template Binding resource. This can be used to create Cluster Role Template Bindings for Rancher v2 environments and retrieve their information.

Example Usage

using Pulumi;
using Rancher2 = Pulumi.Rancher2;

class MyStack : Stack
{
    public MyStack()
    {
        // Create a new Rancher2 Cluster Role Template Binding
        var foo = new Rancher2.ClusterRoleTemplateBinding("foo", new Rancher2.ClusterRoleTemplateBindingArgs
        {
            ClusterId = "<cluster_id>",
            RoleTemplateId = "<role_template_id>",
            UserId = "<user_id>",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-rancher2/sdk/v3/go/rancher2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := rancher2.NewClusterRoleTemplateBinding(ctx, "foo", &rancher2.ClusterRoleTemplateBindingArgs{
			ClusterId:      pulumi.String("<cluster_id>"),
			RoleTemplateId: pulumi.String("<role_template_id>"),
			UserId:         pulumi.String("<user_id>"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_rancher2 as rancher2

# Create a new Rancher2 Cluster Role Template Binding
foo = rancher2.ClusterRoleTemplateBinding("foo",
    cluster_id="<cluster_id>",
    role_template_id="<role_template_id>",
    user_id="<user_id>")
import * as pulumi from "@pulumi/pulumi";
import * as rancher2 from "@pulumi/rancher2";

// Create a new Rancher2 Cluster Role Template Binding
const foo = new rancher2.ClusterRoleTemplateBinding("foo", {
    clusterId: "<cluster_id>",
    roleTemplateId: "<role_template_id>",
    userId: "<user_id>",
});

Coming soon!

Create a ClusterRoleTemplateBinding Resource

new ClusterRoleTemplateBinding(name: string, args: ClusterRoleTemplateBindingArgs, opts?: CustomResourceOptions);
@overload
def ClusterRoleTemplateBinding(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               annotations: Optional[Mapping[str, Any]] = None,
                               cluster_id: Optional[str] = None,
                               group_id: Optional[str] = None,
                               group_principal_id: Optional[str] = None,
                               labels: Optional[Mapping[str, Any]] = None,
                               name: Optional[str] = None,
                               role_template_id: Optional[str] = None,
                               user_id: Optional[str] = None,
                               user_principal_id: Optional[str] = None)
@overload
def ClusterRoleTemplateBinding(resource_name: str,
                               args: ClusterRoleTemplateBindingArgs,
                               opts: Optional[ResourceOptions] = None)
func NewClusterRoleTemplateBinding(ctx *Context, name string, args ClusterRoleTemplateBindingArgs, opts ...ResourceOption) (*ClusterRoleTemplateBinding, error)
public ClusterRoleTemplateBinding(string name, ClusterRoleTemplateBindingArgs args, CustomResourceOptions? opts = null)
public ClusterRoleTemplateBinding(String name, ClusterRoleTemplateBindingArgs args)
public ClusterRoleTemplateBinding(String name, ClusterRoleTemplateBindingArgs args, CustomResourceOptions options)
type: rancher2:ClusterRoleTemplateBinding
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ClusterRoleTemplateBindingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args ClusterRoleTemplateBindingArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ClusterRoleTemplateBindingArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ClusterRoleTemplateBindingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ClusterRoleTemplateBindingArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

ClusterRoleTemplateBinding Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The ClusterRoleTemplateBinding resource accepts the following input properties:

ClusterId string

The cluster id where bind cluster role template binding (string)

RoleTemplateId string

The role template id from create cluster role template binding (string)

Annotations Dictionary<string, object>

Annotations for cluster role template binding (map)

GroupId string

The group ID to assign cluster role template binding (string)

GroupPrincipalId string

The group_principal ID to assign cluster role template binding (string)

Labels Dictionary<string, object>

Labels for cluster role template binding (map)

Name string

The name of the cluster role template binding (string)

UserId string

The user ID to assign cluster role template binding (string)

UserPrincipalId string

The user_principal ID to assign cluster role template binding (string)

ClusterId string

The cluster id where bind cluster role template binding (string)

RoleTemplateId string

The role template id from create cluster role template binding (string)

Annotations map[string]interface{}

Annotations for cluster role template binding (map)

GroupId string

The group ID to assign cluster role template binding (string)

GroupPrincipalId string

The group_principal ID to assign cluster role template binding (string)

Labels map[string]interface{}

Labels for cluster role template binding (map)

Name string

The name of the cluster role template binding (string)

UserId string

The user ID to assign cluster role template binding (string)

UserPrincipalId string

The user_principal ID to assign cluster role template binding (string)

clusterId String

The cluster id where bind cluster role template binding (string)

roleTemplateId String

The role template id from create cluster role template binding (string)

annotations Map<String,Object>

Annotations for cluster role template binding (map)

groupId String

The group ID to assign cluster role template binding (string)

groupPrincipalId String

The group_principal ID to assign cluster role template binding (string)

labels Map<String,Object>

Labels for cluster role template binding (map)

name String

The name of the cluster role template binding (string)

userId String

The user ID to assign cluster role template binding (string)

userPrincipalId String

The user_principal ID to assign cluster role template binding (string)

clusterId string

The cluster id where bind cluster role template binding (string)

roleTemplateId string

The role template id from create cluster role template binding (string)

annotations {[key: string]: any}

Annotations for cluster role template binding (map)

groupId string

The group ID to assign cluster role template binding (string)

groupPrincipalId string

The group_principal ID to assign cluster role template binding (string)

labels {[key: string]: any}

Labels for cluster role template binding (map)

name string

The name of the cluster role template binding (string)

userId string

The user ID to assign cluster role template binding (string)

userPrincipalId string

The user_principal ID to assign cluster role template binding (string)

cluster_id str

The cluster id where bind cluster role template binding (string)

role_template_id str

The role template id from create cluster role template binding (string)

annotations Mapping[str, Any]

Annotations for cluster role template binding (map)

group_id str

The group ID to assign cluster role template binding (string)

group_principal_id str

The group_principal ID to assign cluster role template binding (string)

labels Mapping[str, Any]

Labels for cluster role template binding (map)

name str

The name of the cluster role template binding (string)

user_id str

The user ID to assign cluster role template binding (string)

user_principal_id str

The user_principal ID to assign cluster role template binding (string)

clusterId String

The cluster id where bind cluster role template binding (string)

roleTemplateId String

The role template id from create cluster role template binding (string)

annotations Map<Any>

Annotations for cluster role template binding (map)

groupId String

The group ID to assign cluster role template binding (string)

groupPrincipalId String

The group_principal ID to assign cluster role template binding (string)

labels Map<Any>

Labels for cluster role template binding (map)

name String

The name of the cluster role template binding (string)

userId String

The user ID to assign cluster role template binding (string)

userPrincipalId String

The user_principal ID to assign cluster role template binding (string)

Outputs

All input properties are implicitly available as output properties. Additionally, the ClusterRoleTemplateBinding resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing ClusterRoleTemplateBinding Resource

Get an existing ClusterRoleTemplateBinding resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ClusterRoleTemplateBindingState, opts?: CustomResourceOptions): ClusterRoleTemplateBinding
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        annotations: Optional[Mapping[str, Any]] = None,
        cluster_id: Optional[str] = None,
        group_id: Optional[str] = None,
        group_principal_id: Optional[str] = None,
        labels: Optional[Mapping[str, Any]] = None,
        name: Optional[str] = None,
        role_template_id: Optional[str] = None,
        user_id: Optional[str] = None,
        user_principal_id: Optional[str] = None) -> ClusterRoleTemplateBinding
func GetClusterRoleTemplateBinding(ctx *Context, name string, id IDInput, state *ClusterRoleTemplateBindingState, opts ...ResourceOption) (*ClusterRoleTemplateBinding, error)
public static ClusterRoleTemplateBinding Get(string name, Input<string> id, ClusterRoleTemplateBindingState? state, CustomResourceOptions? opts = null)
public static ClusterRoleTemplateBinding get(String name, Output<String> id, ClusterRoleTemplateBindingState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Annotations Dictionary<string, object>

Annotations for cluster role template binding (map)

ClusterId string

The cluster id where bind cluster role template binding (string)

GroupId string

The group ID to assign cluster role template binding (string)

GroupPrincipalId string

The group_principal ID to assign cluster role template binding (string)

Labels Dictionary<string, object>

Labels for cluster role template binding (map)

Name string

The name of the cluster role template binding (string)

RoleTemplateId string

The role template id from create cluster role template binding (string)

UserId string

The user ID to assign cluster role template binding (string)

UserPrincipalId string

The user_principal ID to assign cluster role template binding (string)

Annotations map[string]interface{}

Annotations for cluster role template binding (map)

ClusterId string

The cluster id where bind cluster role template binding (string)

GroupId string

The group ID to assign cluster role template binding (string)

GroupPrincipalId string

The group_principal ID to assign cluster role template binding (string)

Labels map[string]interface{}

Labels for cluster role template binding (map)

Name string

The name of the cluster role template binding (string)

RoleTemplateId string

The role template id from create cluster role template binding (string)

UserId string

The user ID to assign cluster role template binding (string)

UserPrincipalId string

The user_principal ID to assign cluster role template binding (string)

annotations Map<String,Object>

Annotations for cluster role template binding (map)

clusterId String

The cluster id where bind cluster role template binding (string)

groupId String

The group ID to assign cluster role template binding (string)

groupPrincipalId String

The group_principal ID to assign cluster role template binding (string)

labels Map<String,Object>

Labels for cluster role template binding (map)

name String

The name of the cluster role template binding (string)

roleTemplateId String

The role template id from create cluster role template binding (string)

userId String

The user ID to assign cluster role template binding (string)

userPrincipalId String

The user_principal ID to assign cluster role template binding (string)

annotations {[key: string]: any}

Annotations for cluster role template binding (map)

clusterId string

The cluster id where bind cluster role template binding (string)

groupId string

The group ID to assign cluster role template binding (string)

groupPrincipalId string

The group_principal ID to assign cluster role template binding (string)

labels {[key: string]: any}

Labels for cluster role template binding (map)

name string

The name of the cluster role template binding (string)

roleTemplateId string

The role template id from create cluster role template binding (string)

userId string

The user ID to assign cluster role template binding (string)

userPrincipalId string

The user_principal ID to assign cluster role template binding (string)

annotations Mapping[str, Any]

Annotations for cluster role template binding (map)

cluster_id str

The cluster id where bind cluster role template binding (string)

group_id str

The group ID to assign cluster role template binding (string)

group_principal_id str

The group_principal ID to assign cluster role template binding (string)

labels Mapping[str, Any]

Labels for cluster role template binding (map)

name str

The name of the cluster role template binding (string)

role_template_id str

The role template id from create cluster role template binding (string)

user_id str

The user ID to assign cluster role template binding (string)

user_principal_id str

The user_principal ID to assign cluster role template binding (string)

annotations Map<Any>

Annotations for cluster role template binding (map)

clusterId String

The cluster id where bind cluster role template binding (string)

groupId String

The group ID to assign cluster role template binding (string)

groupPrincipalId String

The group_principal ID to assign cluster role template binding (string)

labels Map<Any>

Labels for cluster role template binding (map)

name String

The name of the cluster role template binding (string)

roleTemplateId String

The role template id from create cluster role template binding (string)

userId String

The user ID to assign cluster role template binding (string)

userPrincipalId String

The user_principal ID to assign cluster role template binding (string)

Import

Cluster Role Template Bindings can be imported using the Rancher cluster Role Template Binding ID

 $ pulumi import rancher2:index/clusterRoleTemplateBinding:ClusterRoleTemplateBinding foo &lt;CLUSTER_ROLE_TEMPLATE_BINDING_ID&gt;

Package Details

Repository
https://github.com/pulumi/pulumi-rancher2
License
Apache-2.0
Notes

This Pulumi package is based on the rancher2 Terraform Provider.