

grafana.BuiltinRoleAssignment
Explore with Pulumi AI
Note: This resource is going to be deprecated with Grafana 9.+, please use grafana.Role instead. Note: This resource is available only with Grafana Enterprise 8.+.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Grafana = Lbrlabs.PulumiPackage.Grafana;
return await Deployment.RunAsync(() =>
{
var viewer = new Grafana.BuiltinRoleAssignment("viewer", new()
{
BuiltinRole = "Viewer",
Roles = new[]
{
new Grafana.Inputs.BuiltinRoleAssignmentRoleArgs
{
Global = false,
Uid = "firstuid",
},
new Grafana.Inputs.BuiltinRoleAssignmentRoleArgs
{
Global = true,
Uid = "seconduid",
},
},
});
});
package main
import (
"github.com/lbrlabs/pulumi-grafana/sdk/go/grafana"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := grafana.NewBuiltinRoleAssignment(ctx, "viewer", &grafana.BuiltinRoleAssignmentArgs{
BuiltinRole: pulumi.String("Viewer"),
Roles: grafana.BuiltinRoleAssignmentRoleArray{
&grafana.BuiltinRoleAssignmentRoleArgs{
Global: pulumi.Bool(false),
Uid: pulumi.String("firstuid"),
},
&grafana.BuiltinRoleAssignmentRoleArgs{
Global: pulumi.Bool(true),
Uid: pulumi.String("seconduid"),
},
},
})
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.grafana.BuiltinRoleAssignment;
import com.pulumi.grafana.BuiltinRoleAssignmentArgs;
import com.pulumi.grafana.inputs.BuiltinRoleAssignmentRoleArgs;
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 viewer = new BuiltinRoleAssignment("viewer", BuiltinRoleAssignmentArgs.builder()
.builtinRole("Viewer")
.roles(
BuiltinRoleAssignmentRoleArgs.builder()
.global(false)
.uid("firstuid")
.build(),
BuiltinRoleAssignmentRoleArgs.builder()
.global(true)
.uid("seconduid")
.build())
.build());
}
}
import pulumi
import lbrlabs_pulumi_grafana as grafana
viewer = grafana.BuiltinRoleAssignment("viewer",
builtin_role="Viewer",
roles=[
grafana.BuiltinRoleAssignmentRoleArgs(
global_=False,
uid="firstuid",
),
grafana.BuiltinRoleAssignmentRoleArgs(
global_=True,
uid="seconduid",
),
])
import * as pulumi from "@pulumi/pulumi";
import * as grafana from "@lbrlabs/pulumi-grafana";
const viewer = new grafana.BuiltinRoleAssignment("viewer", {
builtinRole: "Viewer",
roles: [
{
global: false,
uid: "firstuid",
},
{
global: true,
uid: "seconduid",
},
],
});
resources:
viewer:
type: grafana:BuiltinRoleAssignment
properties:
builtinRole: Viewer
roles:
- global: false
uid: firstuid
- global: true
uid: seconduid
Create BuiltinRoleAssignment Resource
new BuiltinRoleAssignment(name: string, args: BuiltinRoleAssignmentArgs, opts?: CustomResourceOptions);
@overload
def BuiltinRoleAssignment(resource_name: str,
opts: Optional[ResourceOptions] = None,
builtin_role: Optional[str] = None,
roles: Optional[Sequence[BuiltinRoleAssignmentRoleArgs]] = None)
@overload
def BuiltinRoleAssignment(resource_name: str,
args: BuiltinRoleAssignmentArgs,
opts: Optional[ResourceOptions] = None)
func NewBuiltinRoleAssignment(ctx *Context, name string, args BuiltinRoleAssignmentArgs, opts ...ResourceOption) (*BuiltinRoleAssignment, error)
public BuiltinRoleAssignment(string name, BuiltinRoleAssignmentArgs args, CustomResourceOptions? opts = null)
public BuiltinRoleAssignment(String name, BuiltinRoleAssignmentArgs args)
public BuiltinRoleAssignment(String name, BuiltinRoleAssignmentArgs args, CustomResourceOptions options)
type: grafana:BuiltinRoleAssignment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BuiltinRoleAssignmentArgs
- 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 BuiltinRoleAssignmentArgs
- 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 BuiltinRoleAssignmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BuiltinRoleAssignmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BuiltinRoleAssignmentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
BuiltinRoleAssignment 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 BuiltinRoleAssignment resource accepts the following input properties:
- Builtin
Role string Organization roles (
Viewer
,Editor
,Admin
) orGrafana Admin
to assign the roles to.- Roles
List<Lbrlabs.
Pulumi Package. Grafana. Inputs. Builtin Role Assignment Role Args> Fixed or custom roles which provide granular access for specific resources within Grafana.
- Builtin
Role string Organization roles (
Viewer
,Editor
,Admin
) orGrafana Admin
to assign the roles to.- Roles
[]Builtin
Role Assignment Role Args Fixed or custom roles which provide granular access for specific resources within Grafana.
- builtin
Role String Organization roles (
Viewer
,Editor
,Admin
) orGrafana Admin
to assign the roles to.- roles
List<Builtin
Role Assignment Role Args> Fixed or custom roles which provide granular access for specific resources within Grafana.
- builtin
Role string Organization roles (
Viewer
,Editor
,Admin
) orGrafana Admin
to assign the roles to.- roles
Builtin
Role Assignment Role Args[] Fixed or custom roles which provide granular access for specific resources within Grafana.
- builtin_
role str Organization roles (
Viewer
,Editor
,Admin
) orGrafana Admin
to assign the roles to.- roles
Sequence[Builtin
Role Assignment Role Args] Fixed or custom roles which provide granular access for specific resources within Grafana.
- builtin
Role String Organization roles (
Viewer
,Editor
,Admin
) orGrafana Admin
to assign the roles to.- roles List<Property Map>
Fixed or custom roles which provide granular access for specific resources within Grafana.
Outputs
All input properties are implicitly available as output properties. Additionally, the BuiltinRoleAssignment 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 BuiltinRoleAssignment Resource
Get an existing BuiltinRoleAssignment 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?: BuiltinRoleAssignmentState, opts?: CustomResourceOptions): BuiltinRoleAssignment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
builtin_role: Optional[str] = None,
roles: Optional[Sequence[BuiltinRoleAssignmentRoleArgs]] = None) -> BuiltinRoleAssignment
func GetBuiltinRoleAssignment(ctx *Context, name string, id IDInput, state *BuiltinRoleAssignmentState, opts ...ResourceOption) (*BuiltinRoleAssignment, error)
public static BuiltinRoleAssignment Get(string name, Input<string> id, BuiltinRoleAssignmentState? state, CustomResourceOptions? opts = null)
public static BuiltinRoleAssignment get(String name, Output<String> id, BuiltinRoleAssignmentState 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.
- Builtin
Role string Organization roles (
Viewer
,Editor
,Admin
) orGrafana Admin
to assign the roles to.- Roles
List<Lbrlabs.
Pulumi Package. Grafana. Inputs. Builtin Role Assignment Role Args> Fixed or custom roles which provide granular access for specific resources within Grafana.
- Builtin
Role string Organization roles (
Viewer
,Editor
,Admin
) orGrafana Admin
to assign the roles to.- Roles
[]Builtin
Role Assignment Role Args Fixed or custom roles which provide granular access for specific resources within Grafana.
- builtin
Role String Organization roles (
Viewer
,Editor
,Admin
) orGrafana Admin
to assign the roles to.- roles
List<Builtin
Role Assignment Role Args> Fixed or custom roles which provide granular access for specific resources within Grafana.
- builtin
Role string Organization roles (
Viewer
,Editor
,Admin
) orGrafana Admin
to assign the roles to.- roles
Builtin
Role Assignment Role Args[] Fixed or custom roles which provide granular access for specific resources within Grafana.
- builtin_
role str Organization roles (
Viewer
,Editor
,Admin
) orGrafana Admin
to assign the roles to.- roles
Sequence[Builtin
Role Assignment Role Args] Fixed or custom roles which provide granular access for specific resources within Grafana.
- builtin
Role String Organization roles (
Viewer
,Editor
,Admin
) orGrafana Admin
to assign the roles to.- roles List<Property Map>
Fixed or custom roles which provide granular access for specific resources within Grafana.
Supporting Types
BuiltinRoleAssignmentRole
Import
$ pulumi import grafana:index/builtinRoleAssignment:BuiltinRoleAssignment builtin_role_name {{builtin_role_name}}
Package Details
- Repository
- grafana lbrlabs/pulumi-grafana
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
grafana
Terraform Provider.