rancher2.ClusterRoleTemplateBinding
Explore with Pulumi AI
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 System.Collections.Generic;
using System.Linq;
using Pulumi;
using Rancher2 = Pulumi.Rancher2;
return await Deployment.RunAsync(() =>
{
// Create a new Rancher2 Cluster Role Template Binding
var foo = new Rancher2.ClusterRoleTemplateBinding("foo", new()
{
ClusterId = "<cluster_id>",
RoleTemplateId = "<role_template_id>",
UserId = "<user_id>",
});
});
package main
import (
"github.com/pulumi/pulumi-rancher2/sdk/v5/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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.rancher2.ClusterRoleTemplateBinding;
import com.pulumi.rancher2.ClusterRoleTemplateBindingArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var foo = new ClusterRoleTemplateBinding("foo", ClusterRoleTemplateBindingArgs.builder()
.clusterId("<cluster_id>")
.roleTemplateId("<role_template_id>")
.userId("<user_id>")
.build());
}
}
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>",
});
resources:
# Create a new Rancher2 Cluster Role Template Binding
foo:
type: rancher2:ClusterRoleTemplateBinding
properties:
clusterId: <cluster_id>
roleTemplateId: <role_template_id>
userId: <user_id>
Create 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:
- Cluster
Id string The cluster id where bind cluster role template binding (string)
- Role
Template stringId The role template id from create cluster role template binding (string)
- Annotations Dictionary<string, object>
Annotations for cluster role template binding (map)
- Group
Id string The group ID to assign cluster role template binding (string)
- Group
Principal stringId The group_principal ID to assign cluster role template binding (string)
- Labels Dictionary<string, object>
Labels for cluster role template binding (map)
Note: user
user_id | user_principal_id
OR groupgroup_id | group_principal_id
must be defined- Name string
The name of the cluster role template binding (string)
- User
Id string The user ID to assign cluster role template binding (string)
- User
Principal stringId The user_principal ID to assign cluster role template binding (string)
- Cluster
Id string The cluster id where bind cluster role template binding (string)
- Role
Template stringId The role template id from create cluster role template binding (string)
- Annotations map[string]interface{}
Annotations for cluster role template binding (map)
- Group
Id string The group ID to assign cluster role template binding (string)
- Group
Principal stringId The group_principal ID to assign cluster role template binding (string)
- Labels map[string]interface{}
Labels for cluster role template binding (map)
Note: user
user_id | user_principal_id
OR groupgroup_id | group_principal_id
must be defined- Name string
The name of the cluster role template binding (string)
- User
Id string The user ID to assign cluster role template binding (string)
- User
Principal stringId The user_principal ID to assign cluster role template binding (string)
- cluster
Id String The cluster id where bind cluster role template binding (string)
- role
Template StringId The role template id from create cluster role template binding (string)
- annotations Map<String,Object>
Annotations for cluster role template binding (map)
- group
Id String The group ID to assign cluster role template binding (string)
- group
Principal StringId The group_principal ID to assign cluster role template binding (string)
- labels Map<String,Object>
Labels for cluster role template binding (map)
Note: user
user_id | user_principal_id
OR groupgroup_id | group_principal_id
must be defined- name String
The name of the cluster role template binding (string)
- user
Id String The user ID to assign cluster role template binding (string)
- user
Principal StringId The user_principal ID to assign cluster role template binding (string)
- cluster
Id string The cluster id where bind cluster role template binding (string)
- role
Template stringId The role template id from create cluster role template binding (string)
- annotations {[key: string]: any}
Annotations for cluster role template binding (map)
- group
Id string The group ID to assign cluster role template binding (string)
- group
Principal stringId The group_principal ID to assign cluster role template binding (string)
- labels {[key: string]: any}
Labels for cluster role template binding (map)
Note: user
user_id | user_principal_id
OR groupgroup_id | group_principal_id
must be defined- name string
The name of the cluster role template binding (string)
- user
Id string The user ID to assign cluster role template binding (string)
- user
Principal stringId 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_ strid 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_ strid The group_principal ID to assign cluster role template binding (string)
- labels Mapping[str, Any]
Labels for cluster role template binding (map)
Note: user
user_id | user_principal_id
OR groupgroup_id | group_principal_id
must be defined- 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_ strid The user_principal ID to assign cluster role template binding (string)
- cluster
Id String The cluster id where bind cluster role template binding (string)
- role
Template StringId The role template id from create cluster role template binding (string)
- annotations Map<Any>
Annotations for cluster role template binding (map)
- group
Id String The group ID to assign cluster role template binding (string)
- group
Principal StringId The group_principal ID to assign cluster role template binding (string)
- labels Map<Any>
Labels for cluster role template binding (map)
Note: user
user_id | user_principal_id
OR groupgroup_id | group_principal_id
must be defined- name String
The name of the cluster role template binding (string)
- user
Id String The user ID to assign cluster role template binding (string)
- user
Principal StringId 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 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.
- Annotations Dictionary<string, object>
Annotations for cluster role template binding (map)
- Cluster
Id string The cluster id where bind cluster role template binding (string)
- Group
Id string The group ID to assign cluster role template binding (string)
- Group
Principal stringId The group_principal ID to assign cluster role template binding (string)
- Labels Dictionary<string, object>
Labels for cluster role template binding (map)
Note: user
user_id | user_principal_id
OR groupgroup_id | group_principal_id
must be defined- Name string
The name of the cluster role template binding (string)
- Role
Template stringId The role template id from create cluster role template binding (string)
- User
Id string The user ID to assign cluster role template binding (string)
- User
Principal stringId The user_principal ID to assign cluster role template binding (string)
- Annotations map[string]interface{}
Annotations for cluster role template binding (map)
- Cluster
Id string The cluster id where bind cluster role template binding (string)
- Group
Id string The group ID to assign cluster role template binding (string)
- Group
Principal stringId The group_principal ID to assign cluster role template binding (string)
- Labels map[string]interface{}
Labels for cluster role template binding (map)
Note: user
user_id | user_principal_id
OR groupgroup_id | group_principal_id
must be defined- Name string
The name of the cluster role template binding (string)
- Role
Template stringId The role template id from create cluster role template binding (string)
- User
Id string The user ID to assign cluster role template binding (string)
- User
Principal stringId The user_principal ID to assign cluster role template binding (string)
- annotations Map<String,Object>
Annotations for cluster role template binding (map)
- cluster
Id String The cluster id where bind cluster role template binding (string)
- group
Id String The group ID to assign cluster role template binding (string)
- group
Principal StringId The group_principal ID to assign cluster role template binding (string)
- labels Map<String,Object>
Labels for cluster role template binding (map)
Note: user
user_id | user_principal_id
OR groupgroup_id | group_principal_id
must be defined- name String
The name of the cluster role template binding (string)
- role
Template StringId The role template id from create cluster role template binding (string)
- user
Id String The user ID to assign cluster role template binding (string)
- user
Principal StringId The user_principal ID to assign cluster role template binding (string)
- annotations {[key: string]: any}
Annotations for cluster role template binding (map)
- cluster
Id string The cluster id where bind cluster role template binding (string)
- group
Id string The group ID to assign cluster role template binding (string)
- group
Principal stringId The group_principal ID to assign cluster role template binding (string)
- labels {[key: string]: any}
Labels for cluster role template binding (map)
Note: user
user_id | user_principal_id
OR groupgroup_id | group_principal_id
must be defined- name string
The name of the cluster role template binding (string)
- role
Template stringId The role template id from create cluster role template binding (string)
- user
Id string The user ID to assign cluster role template binding (string)
- user
Principal stringId 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_ strid The group_principal ID to assign cluster role template binding (string)
- labels Mapping[str, Any]
Labels for cluster role template binding (map)
Note: user
user_id | user_principal_id
OR groupgroup_id | group_principal_id
must be defined- name str
The name of the cluster role template binding (string)
- role_
template_ strid 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_ strid The user_principal ID to assign cluster role template binding (string)
- annotations Map<Any>
Annotations for cluster role template binding (map)
- cluster
Id String The cluster id where bind cluster role template binding (string)
- group
Id String The group ID to assign cluster role template binding (string)
- group
Principal StringId The group_principal ID to assign cluster role template binding (string)
- labels Map<Any>
Labels for cluster role template binding (map)
Note: user
user_id | user_principal_id
OR groupgroup_id | group_principal_id
must be defined- name String
The name of the cluster role template binding (string)
- role
Template StringId The role template id from create cluster role template binding (string)
- user
Id String The user ID to assign cluster role template binding (string)
- user
Principal StringId 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 <CLUSTER_ROLE_TEMPLATE_BINDING_ID>
Package Details
- Repository
- Rancher2 pulumi/pulumi-rancher2
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
rancher2
Terraform Provider.