Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

ProjectRoleTemplateBinding

Provides a Rancher v2 Project Role Template Binding resource. This can be used to create Project 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 Project Role Template Binding
        var foo = new Rancher2.ProjectRoleTemplateBinding("foo", new Rancher2.ProjectRoleTemplateBindingArgs
        {
            ProjectId = "<project_id>",
            RoleTemplateId = "<role_template_id>",
            UserId = "<user_id>",
        });
    }

}
package main

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

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := rancher2.NewProjectRoleTemplateBinding(ctx, "foo", &rancher2.ProjectRoleTemplateBindingArgs{
            ProjectId:      pulumi.String("<project_id>"),
            RoleTemplateId: pulumi.String("<role_template_id>"),
            UserId:         pulumi.String("<user_id>"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_rancher2 as rancher2

# Create a new rancher2 Project Role Template Binding
foo = rancher2.ProjectRoleTemplateBinding("foo",
    project_id="<project_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 Project Role Template Binding
const foo = new rancher2.ProjectRoleTemplateBinding("foo", {
    projectId: "<project_id>",
    roleTemplateId: "<role_template_id>",
    userId: "<user_id>",
});

Create a ProjectRoleTemplateBinding Resource

new ProjectRoleTemplateBinding(name: string, args: ProjectRoleTemplateBindingArgs, opts?: CustomResourceOptions);
def ProjectRoleTemplateBinding(resource_name: str, opts: Optional[ResourceOptions] = None, annotations: Optional[Mapping[str, Any]] = None, group_id: Optional[str] = None, group_principal_id: Optional[str] = None, labels: Optional[Mapping[str, Any]] = None, name: Optional[str] = None, project_id: Optional[str] = None, role_template_id: Optional[str] = None, user_id: Optional[str] = None, user_principal_id: Optional[str] = None)
func NewProjectRoleTemplateBinding(ctx *Context, name string, args ProjectRoleTemplateBindingArgs, opts ...ResourceOption) (*ProjectRoleTemplateBinding, error)
public ProjectRoleTemplateBinding(string name, ProjectRoleTemplateBindingArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ProjectRoleTemplateBindingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ProjectRoleTemplateBindingArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ProjectRoleTemplateBindingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ProjectRoleTemplateBinding Resource Properties

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

Inputs

The ProjectRoleTemplateBinding resource accepts the following input properties:

ProjectId string

The project id where bind project role template (string)

RoleTemplateId string

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

Annotations Dictionary<string, object>

Annotations of the resource (map)

GroupId string

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

GroupPrincipalId string

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

Labels Dictionary<string, object>

Labels of the resource (map)

Name string

The name of the project role template binding (string)

UserId string

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

UserPrincipalId string

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

ProjectId string

The project id where bind project role template (string)

RoleTemplateId string

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

Annotations map[string]interface{}

Annotations of the resource (map)

GroupId string

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

GroupPrincipalId string

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

Labels map[string]interface{}

Labels of the resource (map)

Name string

The name of the project role template binding (string)

UserId string

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

UserPrincipalId string

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

projectId string

The project id where bind project role template (string)

roleTemplateId string

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

annotations {[key: string]: any}

Annotations of the resource (map)

groupId string

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

groupPrincipalId string

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

labels {[key: string]: any}

Labels of the resource (map)

name string

The name of the project role template binding (string)

userId string

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

userPrincipalId string

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

project_id str

The project id where bind project role template (string)

role_template_id str

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

annotations Mapping[str, Any]

Annotations of the resource (map)

group_id str

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

group_principal_id str

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

labels Mapping[str, Any]

Labels of the resource (map)

name str

The name of the project role template binding (string)

user_id str

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

user_principal_id str

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

Outputs

All input properties are implicitly available as output properties. Additionally, the ProjectRoleTemplateBinding 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing ProjectRoleTemplateBinding Resource

Get an existing ProjectRoleTemplateBinding 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?: ProjectRoleTemplateBindingState, opts?: CustomResourceOptions): ProjectRoleTemplateBinding
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, annotations: Optional[Mapping[str, Any]] = None, group_id: Optional[str] = None, group_principal_id: Optional[str] = None, labels: Optional[Mapping[str, Any]] = None, name: Optional[str] = None, project_id: Optional[str] = None, role_template_id: Optional[str] = None, user_id: Optional[str] = None, user_principal_id: Optional[str] = None) -> ProjectRoleTemplateBinding
func GetProjectRoleTemplateBinding(ctx *Context, name string, id IDInput, state *ProjectRoleTemplateBindingState, opts ...ResourceOption) (*ProjectRoleTemplateBinding, error)
public static ProjectRoleTemplateBinding Get(string name, Input<string> id, ProjectRoleTemplateBindingState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Annotations Dictionary<string, object>

Annotations of the resource (map)

GroupId string

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

GroupPrincipalId string

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

Labels Dictionary<string, object>

Labels of the resource (map)

Name string

The name of the project role template binding (string)

ProjectId string

The project id where bind project role template (string)

RoleTemplateId string

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

UserId string

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

UserPrincipalId string

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

Annotations map[string]interface{}

Annotations of the resource (map)

GroupId string

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

GroupPrincipalId string

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

Labels map[string]interface{}

Labels of the resource (map)

Name string

The name of the project role template binding (string)

ProjectId string

The project id where bind project role template (string)

RoleTemplateId string

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

UserId string

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

UserPrincipalId string

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

annotations {[key: string]: any}

Annotations of the resource (map)

groupId string

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

groupPrincipalId string

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

labels {[key: string]: any}

Labels of the resource (map)

name string

The name of the project role template binding (string)

projectId string

The project id where bind project role template (string)

roleTemplateId string

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

userId string

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

userPrincipalId string

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

annotations Mapping[str, Any]

Annotations of the resource (map)

group_id str

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

group_principal_id str

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

labels Mapping[str, Any]

Labels of the resource (map)

name str

The name of the project role template binding (string)

project_id str

The project id where bind project role template (string)

role_template_id str

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

user_id str

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

user_principal_id str

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

Import

Project Role Template Bindings can be imported using the Rancher Project Role Template Binding ID

 $ pulumi import rancher2:index/projectRoleTemplateBinding:ProjectRoleTemplateBinding foo &lt;project_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.