UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

122 lines (121 loc) 4.69 kB
import * as pulumi from "@pulumi/pulumi"; /** * The `scaleway.observability.GrafanaUser` resource allows you to create and manage [Grafana users](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#grafana-users) in Scaleway Cockpit. * * Refer to Cockpit's [product documentation](https://www.scaleway.com/en/docs/observability/cockpit/concepts/) and [API documentation](https://www.scaleway.com/en/developers/api/cockpit/regional-api) for more information. * * ## Example Usage * * ### Create a Grafana user * * The following command allows you to create a Grafana user within a specific Scaleway Project. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const project = new scaleway.account.Project("project", {name: "test project grafana user"}); * const main = new scaleway.observability.GrafanaUser("main", { * projectId: project.id, * login: "my-awesome-user", * role: "editor", * }); * ``` * * ## Import * * This section explains how to import Grafana users using the ID of the Project associated with Cockpit, and the Grafana user ID in the `{project_id}/{grafana_user_id}` format. * * bash * * ```sh * $ pulumi import scaleway:observability/grafanaUser:GrafanaUser main 11111111-1111-1111-1111-111111111111/2 * ``` */ export declare class GrafanaUser extends pulumi.CustomResource { /** * Get an existing GrafanaUser 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?: GrafanaUserState, opts?: pulumi.CustomResourceOptions): GrafanaUser; /** * Returns true if the given object is an instance of GrafanaUser. 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 GrafanaUser; /** * URL for Grafana. */ readonly grafanaUrl: pulumi.Output<string>; /** * The username of the Grafana user. The `admin` user is not yet available for creation. You need your Grafana username to log in to Grafana and access your dashboards. */ readonly login: pulumi.Output<string>; /** * The password of the Grafana user. */ readonly password: pulumi.Output<string>; /** * ) The ID of the Project the Cockpit is associated with. */ readonly projectId: pulumi.Output<string>; /** * The role assigned to the Grafana user. Must be `editor` or `viewer`. */ readonly role: pulumi.Output<string>; /** * Create a GrafanaUser 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: GrafanaUserArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering GrafanaUser resources. */ export interface GrafanaUserState { /** * URL for Grafana. */ grafanaUrl?: pulumi.Input<string>; /** * The username of the Grafana user. The `admin` user is not yet available for creation. You need your Grafana username to log in to Grafana and access your dashboards. */ login?: pulumi.Input<string>; /** * The password of the Grafana user. */ password?: pulumi.Input<string>; /** * ) The ID of the Project the Cockpit is associated with. */ projectId?: pulumi.Input<string>; /** * The role assigned to the Grafana user. Must be `editor` or `viewer`. */ role?: pulumi.Input<string>; } /** * The set of arguments for constructing a GrafanaUser resource. */ export interface GrafanaUserArgs { /** * The username of the Grafana user. The `admin` user is not yet available for creation. You need your Grafana username to log in to Grafana and access your dashboards. */ login: pulumi.Input<string>; /** * ) The ID of the Project the Cockpit is associated with. */ projectId?: pulumi.Input<string>; /** * The role assigned to the Grafana user. Must be `editor` or `viewer`. */ role: pulumi.Input<string>; }