UNPKG

@pulumiverse/grafana

Version:

A Pulumi package for creating and managing grafana.

224 lines (223 loc) 7.83 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * **Note:** This resource is available only with Grafana Enterprise 8.+. * * * [Official documentation](https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/) * * [HTTP API](https://grafana.com/docs/grafana/latest/developer-resources/api-reference/http-api/api-legacy/access_control/) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@pulumiverse/grafana"; * * const superUser = new grafana.enterprise.Role("super_user", { * name: "Super User", * description: "My Super User description", * uid: "superuseruid", * global: true, * permissions: [ * { * action: "org.users:add", * scope: "users:*", * }, * { * action: "org.users:write", * scope: "users:*", * }, * { * action: "org.users:read", * scope: "users:*", * }, * ], * }); * ``` * * ## Import * * ```sh * terraform import grafana_role.name "{{ uid }}" * terraform import grafana_role.name "{{ orgID }}:{{ uid }}" * ``` */ export declare class Role extends pulumi.CustomResource { /** * Get an existing Role resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RoleState, opts?: pulumi.CustomResourceOptions): Role; /** * Returns true if the given object is an instance of Role. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Role; /** * Whether the role version should be incremented automatically on updates (and set to 1 on creation). * * @deprecated This attribute is ignored. The server manages role versions automatically. */ readonly autoIncrementVersion: pulumi.Output<boolean | undefined>; /** * Description of the role. */ readonly description: pulumi.Output<string | undefined>; /** * Display name of the role. Available with Grafana 8.5+. */ readonly displayName: pulumi.Output<string | undefined>; /** * Boolean to state whether the role is available across all organizations or not. Defaults to `false`. */ readonly global: pulumi.Output<boolean | undefined>; /** * Group of the role. Available with Grafana 8.5+. */ readonly group: pulumi.Output<string | undefined>; /** * Boolean to state whether the role should be visible in the Grafana UI or not. Available with Grafana 8.5+. Defaults to `false`. */ readonly hidden: pulumi.Output<boolean | undefined>; /** * Name of the role */ readonly name: pulumi.Output<string>; /** * The Organization ID. If not set, the Org ID defined in the provider block will be used. */ readonly orgId: pulumi.Output<string | undefined>; /** * Specific set of actions granted by the role. */ readonly permissions: pulumi.Output<outputs.enterprise.RolePermission[] | undefined>; /** * Unique identifier of the role. Used for assignments. */ readonly uid: pulumi.Output<string>; /** * Version of the role. The server manages this automatically. * * @deprecated This attribute is ignored. The server manages role versions automatically. */ readonly version: pulumi.Output<number>; /** * Create a Role resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: RoleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Role resources. */ export interface RoleState { /** * Whether the role version should be incremented automatically on updates (and set to 1 on creation). * * @deprecated This attribute is ignored. The server manages role versions automatically. */ autoIncrementVersion?: pulumi.Input<boolean>; /** * Description of the role. */ description?: pulumi.Input<string>; /** * Display name of the role. Available with Grafana 8.5+. */ displayName?: pulumi.Input<string>; /** * Boolean to state whether the role is available across all organizations or not. Defaults to `false`. */ global?: pulumi.Input<boolean>; /** * Group of the role. Available with Grafana 8.5+. */ group?: pulumi.Input<string>; /** * Boolean to state whether the role should be visible in the Grafana UI or not. Available with Grafana 8.5+. Defaults to `false`. */ hidden?: pulumi.Input<boolean>; /** * Name of the role */ name?: pulumi.Input<string>; /** * The Organization ID. If not set, the Org ID defined in the provider block will be used. */ orgId?: pulumi.Input<string>; /** * Specific set of actions granted by the role. */ permissions?: pulumi.Input<pulumi.Input<inputs.enterprise.RolePermission>[]>; /** * Unique identifier of the role. Used for assignments. */ uid?: pulumi.Input<string>; /** * Version of the role. The server manages this automatically. * * @deprecated This attribute is ignored. The server manages role versions automatically. */ version?: pulumi.Input<number>; } /** * The set of arguments for constructing a Role resource. */ export interface RoleArgs { /** * Whether the role version should be incremented automatically on updates (and set to 1 on creation). * * @deprecated This attribute is ignored. The server manages role versions automatically. */ autoIncrementVersion?: pulumi.Input<boolean>; /** * Description of the role. */ description?: pulumi.Input<string>; /** * Display name of the role. Available with Grafana 8.5+. */ displayName?: pulumi.Input<string>; /** * Boolean to state whether the role is available across all organizations or not. Defaults to `false`. */ global?: pulumi.Input<boolean>; /** * Group of the role. Available with Grafana 8.5+. */ group?: pulumi.Input<string>; /** * Boolean to state whether the role should be visible in the Grafana UI or not. Available with Grafana 8.5+. Defaults to `false`. */ hidden?: pulumi.Input<boolean>; /** * Name of the role */ name?: pulumi.Input<string>; /** * The Organization ID. If not set, the Org ID defined in the provider block will be used. */ orgId?: pulumi.Input<string>; /** * Specific set of actions granted by the role. */ permissions?: pulumi.Input<pulumi.Input<inputs.enterprise.RolePermission>[]>; /** * Unique identifier of the role. Used for assignments. */ uid?: pulumi.Input<string>; /** * Version of the role. The server manages this automatically. * * @deprecated This attribute is ignored. The server manages role versions automatically. */ version?: pulumi.Input<number>; }