@lbrlabs/pulumi-grafana
Version:
A Pulumi package for creating and managing grafana.
133 lines (132 loc) • 4.08 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* * [Official documentation](https://grafana.com/docs/grafana/latest/administration/user-management/server-user-management/)
* * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/user/)
*
* This resource represents an instance-scoped resource and uses Grafana's admin APIs.
* It does not work with API tokens or service accounts which are org-scoped.
* You must use basic auth.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as grafana from "@lbrlabs/pulumi-grafana";
*
* const staff = new grafana.User("staff", {
* email: "staff.name@example.com",
* isAdmin: false,
* login: "staff",
* password: "my-password",
* });
* ```
*
* ## Import
*
* ```sh
* $ pulumi import grafana:index/user:User user_name {{user_id}}
* ```
*/
export declare class User extends pulumi.CustomResource {
/**
* Get an existing User 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?: UserState, opts?: pulumi.CustomResourceOptions): User;
/**
* Returns true if the given object is an instance of User. 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 User;
/**
* The email address of the Grafana user.
*/
readonly email: pulumi.Output<string>;
/**
* Whether to make user an admin. Defaults to `false`.
*/
readonly isAdmin: pulumi.Output<boolean | undefined>;
/**
* The username for the Grafana user.
*/
readonly login: pulumi.Output<string | undefined>;
/**
* The display name for the Grafana user.
*/
readonly name: pulumi.Output<string>;
/**
* The password for the Grafana user.
*/
readonly password: pulumi.Output<string>;
/**
* The numerical ID of the Grafana user.
*/
readonly userId: pulumi.Output<number>;
/**
* Create a User 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: UserArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering User resources.
*/
export interface UserState {
/**
* The email address of the Grafana user.
*/
email?: pulumi.Input<string>;
/**
* Whether to make user an admin. Defaults to `false`.
*/
isAdmin?: pulumi.Input<boolean>;
/**
* The username for the Grafana user.
*/
login?: pulumi.Input<string>;
/**
* The display name for the Grafana user.
*/
name?: pulumi.Input<string>;
/**
* The password for the Grafana user.
*/
password?: pulumi.Input<string>;
/**
* The numerical ID of the Grafana user.
*/
userId?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a User resource.
*/
export interface UserArgs {
/**
* The email address of the Grafana user.
*/
email: pulumi.Input<string>;
/**
* Whether to make user an admin. Defaults to `false`.
*/
isAdmin?: pulumi.Input<boolean>;
/**
* The username for the Grafana user.
*/
login?: pulumi.Input<string>;
/**
* The display name for the Grafana user.
*/
name?: pulumi.Input<string>;
/**
* The password for the Grafana user.
*/
password: pulumi.Input<string>;
}