rancher2.RoleTemplate
Explore with Pulumi AI
Provides a Rancher v2 Role Template resource. This can be used to create Role Template for Rancher v2 and retrieve their information.
cluster
and project
scopes are supported for role templates.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as rancher2 from "@pulumi/rancher2";
// Create a new rancher2 cluster Role Template
const foo = new rancher2.RoleTemplate("foo", {
name: "foo",
context: "cluster",
defaultRole: true,
description: "Terraform role template acceptance test",
rules: [{
apiGroups: ["*"],
resources: ["secrets"],
verbs: ["create"],
}],
});
import pulumi
import pulumi_rancher2 as rancher2
# Create a new rancher2 cluster Role Template
foo = rancher2.RoleTemplate("foo",
name="foo",
context="cluster",
default_role=True,
description="Terraform role template acceptance test",
rules=[{
"api_groups": ["*"],
"resources": ["secrets"],
"verbs": ["create"],
}])
package main
import (
"github.com/pulumi/pulumi-rancher2/sdk/v7/go/rancher2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a new rancher2 cluster Role Template
_, err := rancher2.NewRoleTemplate(ctx, "foo", &rancher2.RoleTemplateArgs{
Name: pulumi.String("foo"),
Context: pulumi.String("cluster"),
DefaultRole: pulumi.Bool(true),
Description: pulumi.String("Terraform role template acceptance test"),
Rules: rancher2.RoleTemplateRuleArray{
&rancher2.RoleTemplateRuleArgs{
ApiGroups: pulumi.StringArray{
pulumi.String("*"),
},
Resources: pulumi.StringArray{
pulumi.String("secrets"),
},
Verbs: pulumi.StringArray{
pulumi.String("create"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Rancher2 = Pulumi.Rancher2;
return await Deployment.RunAsync(() =>
{
// Create a new rancher2 cluster Role Template
var foo = new Rancher2.RoleTemplate("foo", new()
{
Name = "foo",
Context = "cluster",
DefaultRole = true,
Description = "Terraform role template acceptance test",
Rules = new[]
{
new Rancher2.Inputs.RoleTemplateRuleArgs
{
ApiGroups = new[]
{
"*",
},
Resources = new[]
{
"secrets",
},
Verbs = new[]
{
"create",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.rancher2.RoleTemplate;
import com.pulumi.rancher2.RoleTemplateArgs;
import com.pulumi.rancher2.inputs.RoleTemplateRuleArgs;
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) {
// Create a new rancher2 cluster Role Template
var foo = new RoleTemplate("foo", RoleTemplateArgs.builder()
.name("foo")
.context("cluster")
.defaultRole(true)
.description("Terraform role template acceptance test")
.rules(RoleTemplateRuleArgs.builder()
.apiGroups("*")
.resources("secrets")
.verbs("create")
.build())
.build());
}
}
resources:
# Create a new rancher2 cluster Role Template
foo:
type: rancher2:RoleTemplate
properties:
name: foo
context: cluster
defaultRole: true
description: Terraform role template acceptance test
rules:
- apiGroups:
- '*'
resources:
- secrets
verbs:
- create
import * as pulumi from "@pulumi/pulumi";
import * as rancher2 from "@pulumi/rancher2";
// Create a new rancher2 project Role Template
const foo = new rancher2.RoleTemplate("foo", {
name: "foo",
context: "project",
defaultRole: true,
description: "Terraform role template acceptance test",
rules: [{
apiGroups: ["*"],
resources: ["secrets"],
verbs: ["create"],
}],
});
import pulumi
import pulumi_rancher2 as rancher2
# Create a new rancher2 project Role Template
foo = rancher2.RoleTemplate("foo",
name="foo",
context="project",
default_role=True,
description="Terraform role template acceptance test",
rules=[{
"api_groups": ["*"],
"resources": ["secrets"],
"verbs": ["create"],
}])
package main
import (
"github.com/pulumi/pulumi-rancher2/sdk/v7/go/rancher2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a new rancher2 project Role Template
_, err := rancher2.NewRoleTemplate(ctx, "foo", &rancher2.RoleTemplateArgs{
Name: pulumi.String("foo"),
Context: pulumi.String("project"),
DefaultRole: pulumi.Bool(true),
Description: pulumi.String("Terraform role template acceptance test"),
Rules: rancher2.RoleTemplateRuleArray{
&rancher2.RoleTemplateRuleArgs{
ApiGroups: pulumi.StringArray{
pulumi.String("*"),
},
Resources: pulumi.StringArray{
pulumi.String("secrets"),
},
Verbs: pulumi.StringArray{
pulumi.String("create"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Rancher2 = Pulumi.Rancher2;
return await Deployment.RunAsync(() =>
{
// Create a new rancher2 project Role Template
var foo = new Rancher2.RoleTemplate("foo", new()
{
Name = "foo",
Context = "project",
DefaultRole = true,
Description = "Terraform role template acceptance test",
Rules = new[]
{
new Rancher2.Inputs.RoleTemplateRuleArgs
{
ApiGroups = new[]
{
"*",
},
Resources = new[]
{
"secrets",
},
Verbs = new[]
{
"create",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.rancher2.RoleTemplate;
import com.pulumi.rancher2.RoleTemplateArgs;
import com.pulumi.rancher2.inputs.RoleTemplateRuleArgs;
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) {
// Create a new rancher2 project Role Template
var foo = new RoleTemplate("foo", RoleTemplateArgs.builder()
.name("foo")
.context("project")
.defaultRole(true)
.description("Terraform role template acceptance test")
.rules(RoleTemplateRuleArgs.builder()
.apiGroups("*")
.resources("secrets")
.verbs("create")
.build())
.build());
}
}
resources:
# Create a new rancher2 project Role Template
foo:
type: rancher2:RoleTemplate
properties:
name: foo
context: project
defaultRole: true
description: Terraform role template acceptance test
rules:
- apiGroups:
- '*'
resources:
- secrets
verbs:
- create
Create RoleTemplate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RoleTemplate(name: string, args?: RoleTemplateArgs, opts?: CustomResourceOptions);
@overload
def RoleTemplate(resource_name: str,
args: Optional[RoleTemplateArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def RoleTemplate(resource_name: str,
opts: Optional[ResourceOptions] = None,
administrative: Optional[bool] = None,
annotations: Optional[Mapping[str, str]] = None,
context: Optional[str] = None,
default_role: Optional[bool] = None,
description: Optional[str] = None,
external: Optional[bool] = None,
external_rules: Optional[Sequence[RoleTemplateExternalRuleArgs]] = None,
hidden: Optional[bool] = None,
labels: Optional[Mapping[str, str]] = None,
locked: Optional[bool] = None,
name: Optional[str] = None,
role_template_ids: Optional[Sequence[str]] = None,
rules: Optional[Sequence[RoleTemplateRuleArgs]] = None)
func NewRoleTemplate(ctx *Context, name string, args *RoleTemplateArgs, opts ...ResourceOption) (*RoleTemplate, error)
public RoleTemplate(string name, RoleTemplateArgs? args = null, CustomResourceOptions? opts = null)
public RoleTemplate(String name, RoleTemplateArgs args)
public RoleTemplate(String name, RoleTemplateArgs args, CustomResourceOptions options)
type: rancher2:RoleTemplate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args RoleTemplateArgs
- 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 RoleTemplateArgs
- 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 RoleTemplateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RoleTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RoleTemplateArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var roleTemplateResource = new Rancher2.RoleTemplate("roleTemplateResource", new()
{
Administrative = false,
Annotations =
{
{ "string", "string" },
},
Context = "string",
DefaultRole = false,
Description = "string",
External = false,
ExternalRules = new[]
{
new Rancher2.Inputs.RoleTemplateExternalRuleArgs
{
ApiGroups = new[]
{
"string",
},
NonResourceUrls = new[]
{
"string",
},
ResourceNames = new[]
{
"string",
},
Resources = new[]
{
"string",
},
Verbs = new[]
{
"string",
},
},
},
Hidden = false,
Labels =
{
{ "string", "string" },
},
Locked = false,
Name = "string",
RoleTemplateIds = new[]
{
"string",
},
Rules = new[]
{
new Rancher2.Inputs.RoleTemplateRuleArgs
{
ApiGroups = new[]
{
"string",
},
NonResourceUrls = new[]
{
"string",
},
ResourceNames = new[]
{
"string",
},
Resources = new[]
{
"string",
},
Verbs = new[]
{
"string",
},
},
},
});
example, err := rancher2.NewRoleTemplate(ctx, "roleTemplateResource", &rancher2.RoleTemplateArgs{
Administrative: pulumi.Bool(false),
Annotations: pulumi.StringMap{
"string": pulumi.String("string"),
},
Context: pulumi.String("string"),
DefaultRole: pulumi.Bool(false),
Description: pulumi.String("string"),
External: pulumi.Bool(false),
ExternalRules: rancher2.RoleTemplateExternalRuleArray{
&rancher2.RoleTemplateExternalRuleArgs{
ApiGroups: pulumi.StringArray{
pulumi.String("string"),
},
NonResourceUrls: pulumi.StringArray{
pulumi.String("string"),
},
ResourceNames: pulumi.StringArray{
pulumi.String("string"),
},
Resources: pulumi.StringArray{
pulumi.String("string"),
},
Verbs: pulumi.StringArray{
pulumi.String("string"),
},
},
},
Hidden: pulumi.Bool(false),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Locked: pulumi.Bool(false),
Name: pulumi.String("string"),
RoleTemplateIds: pulumi.StringArray{
pulumi.String("string"),
},
Rules: rancher2.RoleTemplateRuleArray{
&rancher2.RoleTemplateRuleArgs{
ApiGroups: pulumi.StringArray{
pulumi.String("string"),
},
NonResourceUrls: pulumi.StringArray{
pulumi.String("string"),
},
ResourceNames: pulumi.StringArray{
pulumi.String("string"),
},
Resources: pulumi.StringArray{
pulumi.String("string"),
},
Verbs: pulumi.StringArray{
pulumi.String("string"),
},
},
},
})
var roleTemplateResource = new RoleTemplate("roleTemplateResource", RoleTemplateArgs.builder()
.administrative(false)
.annotations(Map.of("string", "string"))
.context("string")
.defaultRole(false)
.description("string")
.external(false)
.externalRules(RoleTemplateExternalRuleArgs.builder()
.apiGroups("string")
.nonResourceUrls("string")
.resourceNames("string")
.resources("string")
.verbs("string")
.build())
.hidden(false)
.labels(Map.of("string", "string"))
.locked(false)
.name("string")
.roleTemplateIds("string")
.rules(RoleTemplateRuleArgs.builder()
.apiGroups("string")
.nonResourceUrls("string")
.resourceNames("string")
.resources("string")
.verbs("string")
.build())
.build());
role_template_resource = rancher2.RoleTemplate("roleTemplateResource",
administrative=False,
annotations={
"string": "string",
},
context="string",
default_role=False,
description="string",
external=False,
external_rules=[rancher2.RoleTemplateExternalRuleArgs(
api_groups=["string"],
non_resource_urls=["string"],
resource_names=["string"],
resources=["string"],
verbs=["string"],
)],
hidden=False,
labels={
"string": "string",
},
locked=False,
name="string",
role_template_ids=["string"],
rules=[rancher2.RoleTemplateRuleArgs(
api_groups=["string"],
non_resource_urls=["string"],
resource_names=["string"],
resources=["string"],
verbs=["string"],
)])
const roleTemplateResource = new rancher2.RoleTemplate("roleTemplateResource", {
administrative: false,
annotations: {
string: "string",
},
context: "string",
defaultRole: false,
description: "string",
external: false,
externalRules: [{
apiGroups: ["string"],
nonResourceUrls: ["string"],
resourceNames: ["string"],
resources: ["string"],
verbs: ["string"],
}],
hidden: false,
labels: {
string: "string",
},
locked: false,
name: "string",
roleTemplateIds: ["string"],
rules: [{
apiGroups: ["string"],
nonResourceUrls: ["string"],
resourceNames: ["string"],
resources: ["string"],
verbs: ["string"],
}],
});
type: rancher2:RoleTemplate
properties:
administrative: false
annotations:
string: string
context: string
defaultRole: false
description: string
external: false
externalRules:
- apiGroups:
- string
nonResourceUrls:
- string
resourceNames:
- string
resources:
- string
verbs:
- string
hidden: false
labels:
string: string
locked: false
name: string
roleTemplateIds:
- string
rules:
- apiGroups:
- string
nonResourceUrls:
- string
resourceNames:
- string
resources:
- string
verbs:
- string
RoleTemplate 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 RoleTemplate resource accepts the following input properties:
- Administrative bool
- Administrative role template. Default
false
(bool) - Annotations Dictionary<string, string>
- Annotations for role template object (map)
- Context string
- Role template context.
cluster
andproject
values are supported. Default:cluster
(string) - Default
Role bool - Default role template for new created cluster or project. Default
false
(bool) - Description string
- Role template description (string)
- External bool
- External role template. Default
false
(bool) - External
Rules List<RoleTemplate External Rule> - External rules used for authorization. This field is required when
external=true
and no underlying ClusterRole exists. (list) - bool
- Hidden role template. Default
false
(bool) - Labels Dictionary<string, string>
- Labels for role template object (map)
- Locked bool
- Locked role template. Default
false
(bool) - Name string
- Role template name (string)
- Role
Template List<string>Ids - Inherit role template IDs (list)
- Rules
List<Role
Template Rule> - Role template policy rules (list)
- Administrative bool
- Administrative role template. Default
false
(bool) - Annotations map[string]string
- Annotations for role template object (map)
- Context string
- Role template context.
cluster
andproject
values are supported. Default:cluster
(string) - Default
Role bool - Default role template for new created cluster or project. Default
false
(bool) - Description string
- Role template description (string)
- External bool
- External role template. Default
false
(bool) - External
Rules []RoleTemplate External Rule Args - External rules used for authorization. This field is required when
external=true
and no underlying ClusterRole exists. (list) - bool
- Hidden role template. Default
false
(bool) - Labels map[string]string
- Labels for role template object (map)
- Locked bool
- Locked role template. Default
false
(bool) - Name string
- Role template name (string)
- Role
Template []stringIds - Inherit role template IDs (list)
- Rules
[]Role
Template Rule Args - Role template policy rules (list)
- administrative Boolean
- Administrative role template. Default
false
(bool) - annotations Map<String,String>
- Annotations for role template object (map)
- context String
- Role template context.
cluster
andproject
values are supported. Default:cluster
(string) - default
Role Boolean - Default role template for new created cluster or project. Default
false
(bool) - description String
- Role template description (string)
- external Boolean
- External role template. Default
false
(bool) - external
Rules List<RoleTemplate External Rule> - External rules used for authorization. This field is required when
external=true
and no underlying ClusterRole exists. (list) - Boolean
- Hidden role template. Default
false
(bool) - labels Map<String,String>
- Labels for role template object (map)
- locked Boolean
- Locked role template. Default
false
(bool) - name String
- Role template name (string)
- role
Template List<String>Ids - Inherit role template IDs (list)
- rules
List<Role
Template Rule> - Role template policy rules (list)
- administrative boolean
- Administrative role template. Default
false
(bool) - annotations {[key: string]: string}
- Annotations for role template object (map)
- context string
- Role template context.
cluster
andproject
values are supported. Default:cluster
(string) - default
Role boolean - Default role template for new created cluster or project. Default
false
(bool) - description string
- Role template description (string)
- external boolean
- External role template. Default
false
(bool) - external
Rules RoleTemplate External Rule[] - External rules used for authorization. This field is required when
external=true
and no underlying ClusterRole exists. (list) - boolean
- Hidden role template. Default
false
(bool) - labels {[key: string]: string}
- Labels for role template object (map)
- locked boolean
- Locked role template. Default
false
(bool) - name string
- Role template name (string)
- role
Template string[]Ids - Inherit role template IDs (list)
- rules
Role
Template Rule[] - Role template policy rules (list)
- administrative bool
- Administrative role template. Default
false
(bool) - annotations Mapping[str, str]
- Annotations for role template object (map)
- context str
- Role template context.
cluster
andproject
values are supported. Default:cluster
(string) - default_
role bool - Default role template for new created cluster or project. Default
false
(bool) - description str
- Role template description (string)
- external bool
- External role template. Default
false
(bool) - external_
rules Sequence[RoleTemplate External Rule Args] - External rules used for authorization. This field is required when
external=true
and no underlying ClusterRole exists. (list) - bool
- Hidden role template. Default
false
(bool) - labels Mapping[str, str]
- Labels for role template object (map)
- locked bool
- Locked role template. Default
false
(bool) - name str
- Role template name (string)
- role_
template_ Sequence[str]ids - Inherit role template IDs (list)
- rules
Sequence[Role
Template Rule Args] - Role template policy rules (list)
- administrative Boolean
- Administrative role template. Default
false
(bool) - annotations Map<String>
- Annotations for role template object (map)
- context String
- Role template context.
cluster
andproject
values are supported. Default:cluster
(string) - default
Role Boolean - Default role template for new created cluster or project. Default
false
(bool) - description String
- Role template description (string)
- external Boolean
- External role template. Default
false
(bool) - external
Rules List<Property Map> - External rules used for authorization. This field is required when
external=true
and no underlying ClusterRole exists. (list) - Boolean
- Hidden role template. Default
false
(bool) - labels Map<String>
- Labels for role template object (map)
- locked Boolean
- Locked role template. Default
false
(bool) - name String
- Role template name (string)
- role
Template List<String>Ids - Inherit role template IDs (list)
- rules List<Property Map>
- Role template policy rules (list)
Outputs
All input properties are implicitly available as output properties. Additionally, the RoleTemplate resource produces the following output properties:
Look up Existing RoleTemplate Resource
Get an existing RoleTemplate 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?: RoleTemplateState, opts?: CustomResourceOptions): RoleTemplate
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
administrative: Optional[bool] = None,
annotations: Optional[Mapping[str, str]] = None,
builtin: Optional[bool] = None,
context: Optional[str] = None,
default_role: Optional[bool] = None,
description: Optional[str] = None,
external: Optional[bool] = None,
external_rules: Optional[Sequence[RoleTemplateExternalRuleArgs]] = None,
hidden: Optional[bool] = None,
labels: Optional[Mapping[str, str]] = None,
locked: Optional[bool] = None,
name: Optional[str] = None,
role_template_ids: Optional[Sequence[str]] = None,
rules: Optional[Sequence[RoleTemplateRuleArgs]] = None) -> RoleTemplate
func GetRoleTemplate(ctx *Context, name string, id IDInput, state *RoleTemplateState, opts ...ResourceOption) (*RoleTemplate, error)
public static RoleTemplate Get(string name, Input<string> id, RoleTemplateState? state, CustomResourceOptions? opts = null)
public static RoleTemplate get(String name, Output<String> id, RoleTemplateState 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.
- Administrative bool
- Administrative role template. Default
false
(bool) - Annotations Dictionary<string, string>
- Annotations for role template object (map)
- Builtin bool
- (Computed) Builtin role template (string)
- Context string
- Role template context.
cluster
andproject
values are supported. Default:cluster
(string) - Default
Role bool - Default role template for new created cluster or project. Default
false
(bool) - Description string
- Role template description (string)
- External bool
- External role template. Default
false
(bool) - External
Rules List<RoleTemplate External Rule> - External rules used for authorization. This field is required when
external=true
and no underlying ClusterRole exists. (list) - bool
- Hidden role template. Default
false
(bool) - Labels Dictionary<string, string>
- Labels for role template object (map)
- Locked bool
- Locked role template. Default
false
(bool) - Name string
- Role template name (string)
- Role
Template List<string>Ids - Inherit role template IDs (list)
- Rules
List<Role
Template Rule> - Role template policy rules (list)
- Administrative bool
- Administrative role template. Default
false
(bool) - Annotations map[string]string
- Annotations for role template object (map)
- Builtin bool
- (Computed) Builtin role template (string)
- Context string
- Role template context.
cluster
andproject
values are supported. Default:cluster
(string) - Default
Role bool - Default role template for new created cluster or project. Default
false
(bool) - Description string
- Role template description (string)
- External bool
- External role template. Default
false
(bool) - External
Rules []RoleTemplate External Rule Args - External rules used for authorization. This field is required when
external=true
and no underlying ClusterRole exists. (list) - bool
- Hidden role template. Default
false
(bool) - Labels map[string]string
- Labels for role template object (map)
- Locked bool
- Locked role template. Default
false
(bool) - Name string
- Role template name (string)
- Role
Template []stringIds - Inherit role template IDs (list)
- Rules
[]Role
Template Rule Args - Role template policy rules (list)
- administrative Boolean
- Administrative role template. Default
false
(bool) - annotations Map<String,String>
- Annotations for role template object (map)
- builtin Boolean
- (Computed) Builtin role template (string)
- context String
- Role template context.
cluster
andproject
values are supported. Default:cluster
(string) - default
Role Boolean - Default role template for new created cluster or project. Default
false
(bool) - description String
- Role template description (string)
- external Boolean
- External role template. Default
false
(bool) - external
Rules List<RoleTemplate External Rule> - External rules used for authorization. This field is required when
external=true
and no underlying ClusterRole exists. (list) - Boolean
- Hidden role template. Default
false
(bool) - labels Map<String,String>
- Labels for role template object (map)
- locked Boolean
- Locked role template. Default
false
(bool) - name String
- Role template name (string)
- role
Template List<String>Ids - Inherit role template IDs (list)
- rules
List<Role
Template Rule> - Role template policy rules (list)
- administrative boolean
- Administrative role template. Default
false
(bool) - annotations {[key: string]: string}
- Annotations for role template object (map)
- builtin boolean
- (Computed) Builtin role template (string)
- context string
- Role template context.
cluster
andproject
values are supported. Default:cluster
(string) - default
Role boolean - Default role template for new created cluster or project. Default
false
(bool) - description string
- Role template description (string)
- external boolean
- External role template. Default
false
(bool) - external
Rules RoleTemplate External Rule[] - External rules used for authorization. This field is required when
external=true
and no underlying ClusterRole exists. (list) - boolean
- Hidden role template. Default
false
(bool) - labels {[key: string]: string}
- Labels for role template object (map)
- locked boolean
- Locked role template. Default
false
(bool) - name string
- Role template name (string)
- role
Template string[]Ids - Inherit role template IDs (list)
- rules
Role
Template Rule[] - Role template policy rules (list)
- administrative bool
- Administrative role template. Default
false
(bool) - annotations Mapping[str, str]
- Annotations for role template object (map)
- builtin bool
- (Computed) Builtin role template (string)
- context str
- Role template context.
cluster
andproject
values are supported. Default:cluster
(string) - default_
role bool - Default role template for new created cluster or project. Default
false
(bool) - description str
- Role template description (string)
- external bool
- External role template. Default
false
(bool) - external_
rules Sequence[RoleTemplate External Rule Args] - External rules used for authorization. This field is required when
external=true
and no underlying ClusterRole exists. (list) - bool
- Hidden role template. Default
false
(bool) - labels Mapping[str, str]
- Labels for role template object (map)
- locked bool
- Locked role template. Default
false
(bool) - name str
- Role template name (string)
- role_
template_ Sequence[str]ids - Inherit role template IDs (list)
- rules
Sequence[Role
Template Rule Args] - Role template policy rules (list)
- administrative Boolean
- Administrative role template. Default
false
(bool) - annotations Map<String>
- Annotations for role template object (map)
- builtin Boolean
- (Computed) Builtin role template (string)
- context String
- Role template context.
cluster
andproject
values are supported. Default:cluster
(string) - default
Role Boolean - Default role template for new created cluster or project. Default
false
(bool) - description String
- Role template description (string)
- external Boolean
- External role template. Default
false
(bool) - external
Rules List<Property Map> - External rules used for authorization. This field is required when
external=true
and no underlying ClusterRole exists. (list) - Boolean
- Hidden role template. Default
false
(bool) - labels Map<String>
- Labels for role template object (map)
- locked Boolean
- Locked role template. Default
false
(bool) - name String
- Role template name (string)
- role
Template List<String>Ids - Inherit role template IDs (list)
- rules List<Property Map>
- Role template policy rules (list)
Supporting Types
RoleTemplateExternalRule, RoleTemplateExternalRuleArgs
- Api
Groups List<string> - Policy rule api groups
- Non
Resource List<string>Urls - Policy rule non resource urls
- Resource
Names List<string> - Policy rule resource names
- Resources List<string>
- Policy rule resources
- Verbs List<string>
- Policy rule verbs
- Api
Groups []string - Policy rule api groups
- Non
Resource []stringUrls - Policy rule non resource urls
- Resource
Names []string - Policy rule resource names
- Resources []string
- Policy rule resources
- Verbs []string
- Policy rule verbs
- api
Groups List<String> - Policy rule api groups
- non
Resource List<String>Urls - Policy rule non resource urls
- resource
Names List<String> - Policy rule resource names
- resources List<String>
- Policy rule resources
- verbs List<String>
- Policy rule verbs
- api
Groups string[] - Policy rule api groups
- non
Resource string[]Urls - Policy rule non resource urls
- resource
Names string[] - Policy rule resource names
- resources string[]
- Policy rule resources
- verbs string[]
- Policy rule verbs
- api_
groups Sequence[str] - Policy rule api groups
- non_
resource_ Sequence[str]urls - Policy rule non resource urls
- resource_
names Sequence[str] - Policy rule resource names
- resources Sequence[str]
- Policy rule resources
- verbs Sequence[str]
- Policy rule verbs
- api
Groups List<String> - Policy rule api groups
- non
Resource List<String>Urls - Policy rule non resource urls
- resource
Names List<String> - Policy rule resource names
- resources List<String>
- Policy rule resources
- verbs List<String>
- Policy rule verbs
RoleTemplateRule, RoleTemplateRuleArgs
- Api
Groups List<string> - Policy rule api groups
- Non
Resource List<string>Urls - Policy rule non resource urls
- Resource
Names List<string> - Policy rule resource names
- Resources List<string>
- Policy rule resources
- Verbs List<string>
- Policy rule verbs
- Api
Groups []string - Policy rule api groups
- Non
Resource []stringUrls - Policy rule non resource urls
- Resource
Names []string - Policy rule resource names
- Resources []string
- Policy rule resources
- Verbs []string
- Policy rule verbs
- api
Groups List<String> - Policy rule api groups
- non
Resource List<String>Urls - Policy rule non resource urls
- resource
Names List<String> - Policy rule resource names
- resources List<String>
- Policy rule resources
- verbs List<String>
- Policy rule verbs
- api
Groups string[] - Policy rule api groups
- non
Resource string[]Urls - Policy rule non resource urls
- resource
Names string[] - Policy rule resource names
- resources string[]
- Policy rule resources
- verbs string[]
- Policy rule verbs
- api_
groups Sequence[str] - Policy rule api groups
- non_
resource_ Sequence[str]urls - Policy rule non resource urls
- resource_
names Sequence[str] - Policy rule resource names
- resources Sequence[str]
- Policy rule resources
- verbs Sequence[str]
- Policy rule verbs
- api
Groups List<String> - Policy rule api groups
- non
Resource List<String>Urls - Policy rule non resource urls
- resource
Names List<String> - Policy rule resource names
- resources List<String>
- Policy rule resources
- verbs List<String>
- Policy rule verbs
Import
Role Template can be imported using the Rancher Role Template ID
$ pulumi import rancher2:index/roleTemplate:RoleTemplate foo <role_template_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Rancher2 pulumi/pulumi-rancher2
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
rancher2
Terraform Provider.