UNPKG

@pulumiverse/grafana

Version:

A Pulumi package for creating and managing grafana.

141 lines (140 loc) 5.52 kB
import * as pulumi from "@pulumi/pulumi"; /** * **Note:** Available in [Grafana Enterprise](https://grafana.com/docs/grafana/latest/introduction/grafana-enterprise/) and [Grafana Cloud](https://grafana.com/docs/grafana-cloud/). * * * [Official documentation](https://grafana.com/docs/grafana/latest/setup-grafana/configure-access/configure-scim-provisioning/) * * ## Example Usage * * ### Grafana Enterprise * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@pulumiverse/grafana"; * * const _default = new grafana.enterprise.ScimConfig("default", { * enableUserSync: true, * enableGroupSync: false, * rejectNonProvisionedUsers: false, * }); * ``` * * ### Grafana Cloud * * When using this resource against a Grafana Cloud stack authenticated with a stack service account token, the `stackId` attribute must be set on the provider block so the request is routed to the correct stack namespace. Without it, the API returns `403 authn.invalid-namespace`. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@pulumiverse/grafana"; * * const myStack = new grafana.cloud.Stack("my_stack", { * name: "my-stack", * slug: "my-stack", * }); * const cloudSa = new grafana.cloud.StackServiceAccount("cloud_sa", { * stackSlug: myStack.slug, * name: "scim-terraform", * role: "Admin", * }); * const cloudSaStackServiceAccountToken = new grafana.cloud.StackServiceAccountToken("cloud_sa", { * stackSlug: myStack.slug, * serviceAccountId: cloudSa.id, * name: "scim-terraform", * }); * const _default = new grafana.enterprise.ScimConfig("default", { * enableUserSync: true, * enableGroupSync: false, * rejectNonProvisionedUsers: false, * }); * ``` * * ## Import * * ```sh * $ pulumi import grafana:enterprise/scimConfig:ScimConfig name "" * terraform import grafana_scim_config.name "{{ orgID }}" * ``` */ export declare class ScimConfig extends pulumi.CustomResource { /** * Get an existing ScimConfig 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?: ScimConfigState, opts?: pulumi.CustomResourceOptions): ScimConfig; /** * Returns true if the given object is an instance of ScimConfig. 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 ScimConfig; /** * Whether group synchronization is enabled. */ readonly enableGroupSync: pulumi.Output<boolean>; /** * Whether user synchronization is enabled. */ readonly enableUserSync: pulumi.Output<boolean>; /** * The Organization ID. If not set, the default organization is used for basic authentication, or the one that owns your service account for token authentication. */ readonly orgId: pulumi.Output<string>; /** * Whether to block non-provisioned user access to Grafana. Cloud Portal users will always be able to access Grafana, regardless of this setting. */ readonly rejectNonProvisionedUsers: pulumi.Output<boolean>; /** * Create a ScimConfig 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: ScimConfigArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ScimConfig resources. */ export interface ScimConfigState { /** * Whether group synchronization is enabled. */ enableGroupSync?: pulumi.Input<boolean>; /** * Whether user synchronization is enabled. */ enableUserSync?: pulumi.Input<boolean>; /** * The Organization ID. If not set, the default organization is used for basic authentication, or the one that owns your service account for token authentication. */ orgId?: pulumi.Input<string>; /** * Whether to block non-provisioned user access to Grafana. Cloud Portal users will always be able to access Grafana, regardless of this setting. */ rejectNonProvisionedUsers?: pulumi.Input<boolean>; } /** * The set of arguments for constructing a ScimConfig resource. */ export interface ScimConfigArgs { /** * Whether group synchronization is enabled. */ enableGroupSync: pulumi.Input<boolean>; /** * Whether user synchronization is enabled. */ enableUserSync: pulumi.Input<boolean>; /** * The Organization ID. If not set, the default organization is used for basic authentication, or the one that owns your service account for token authentication. */ orgId?: pulumi.Input<string>; /** * Whether to block non-provisioned user access to Grafana. Cloud Portal users will always be able to access Grafana, regardless of this setting. */ rejectNonProvisionedUsers: pulumi.Input<boolean>; }