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:
- Project
Id string The project id where bind project role template (string)
- Role
Template stringId The role template id from create project role template binding (string)
- Annotations Dictionary<string, object>
Annotations of the resource (map)
- Group
Id string The group ID to assign project role template binding (string)
- Group
Principal stringId 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)
- User
Id string The user ID to assign project role template binding (string)
- User
Principal stringId The user_principal ID to assign project role template binding (string)
- Project
Id string The project id where bind project role template (string)
- Role
Template stringId The role template id from create project role template binding (string)
- Annotations map[string]interface{}
Annotations of the resource (map)
- Group
Id string The group ID to assign project role template binding (string)
- Group
Principal stringId 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)
- User
Id string The user ID to assign project role template binding (string)
- User
Principal stringId The user_principal ID to assign project role template binding (string)
- project
Id string The project id where bind project role template (string)
- role
Template stringId The role template id from create project role template binding (string)
- annotations {[key: string]: any}
Annotations of the resource (map)
- group
Id string The group ID to assign project role template binding (string)
- group
Principal stringId 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)
- user
Id string The user ID to assign project role template binding (string)
- user
Principal stringId 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_ strid 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_ strid 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_ strid 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)
- Group
Id string The group ID to assign project role template binding (string)
- Group
Principal stringId 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)
- Project
Id string The project id where bind project role template (string)
- Role
Template stringId The role template id from create project role template binding (string)
- User
Id string The user ID to assign project role template binding (string)
- User
Principal stringId The user_principal ID to assign project role template binding (string)
- Annotations map[string]interface{}
Annotations of the resource (map)
- Group
Id string The group ID to assign project role template binding (string)
- Group
Principal stringId 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)
- Project
Id string The project id where bind project role template (string)
- Role
Template stringId The role template id from create project role template binding (string)
- User
Id string The user ID to assign project role template binding (string)
- User
Principal stringId The user_principal ID to assign project role template binding (string)
- annotations {[key: string]: any}
Annotations of the resource (map)
- group
Id string The group ID to assign project role template binding (string)
- group
Principal stringId 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)
- project
Id string The project id where bind project role template (string)
- role
Template stringId The role template id from create project role template binding (string)
- user
Id string The user ID to assign project role template binding (string)
- user
Principal stringId 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_ strid 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_ strid 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_ strid 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 <project_role_template_binding_id>
Package Details
- Repository
- https://github.com/pulumi/pulumi-rancher2
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
rancher2
Terraform Provider.