@lbrlabs/pulumi-grafana
Version:
A Pulumi package for creating and managing grafana.
292 lines (291 loc) • 11.1 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* * [Official documentation](https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#stacks/)
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as grafana from "@lbrlabs/pulumi-grafana";
*
* const test = new grafana.CloudStack("test", {
* description: "Test Grafana Cloud Stack",
* regionSlug: "eu",
* slug: "gcloudstacktest",
* });
* ```
*
* ## Import
*
* ```sh
* $ pulumi import grafana:index/cloudStack:CloudStack stack_name {{stack_id}} // import by numerical ID
* ```
*
* ```sh
* $ pulumi import grafana:index/cloudStack:CloudStack stack_name {{stack_slug}} // or import by slug
* ```
*/
export declare class CloudStack extends pulumi.CustomResource {
/**
* Get an existing CloudStack 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?: CloudStackState, opts?: pulumi.CustomResourceOptions): CloudStack;
/**
* Returns true if the given object is an instance of CloudStack. 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 CloudStack;
/**
* Name of the Alertmanager instance configured for this stack.
*/
readonly alertmanagerName: pulumi.Output<string>;
/**
* Status of the Alertmanager instance configured for this stack.
*/
readonly alertmanagerStatus: pulumi.Output<string>;
/**
* Base URL of the Alertmanager instance configured for this stack.
*/
readonly alertmanagerUrl: pulumi.Output<string>;
/**
* User ID of the Alertmanager instance configured for this stack.
*/
readonly alertmanagerUserId: pulumi.Output<number>;
/**
* Description of stack.
*/
readonly description: pulumi.Output<string | undefined>;
readonly graphiteName: pulumi.Output<string>;
readonly graphiteStatus: pulumi.Output<string>;
readonly graphiteUrl: pulumi.Output<string>;
readonly graphiteUserId: pulumi.Output<number>;
readonly logsName: pulumi.Output<string>;
readonly logsStatus: pulumi.Output<string>;
readonly logsUrl: pulumi.Output<string>;
readonly logsUserId: pulumi.Output<number>;
/**
* Name of stack. Conventionally matches the url of the instance (e.g. “\n\n.grafana.net”).
*/
readonly name: pulumi.Output<string>;
/**
* Organization id to assign to this stack.
*/
readonly orgId: pulumi.Output<number>;
/**
* Organization name to assign to this stack.
*/
readonly orgName: pulumi.Output<string>;
/**
* Organization slug to assign to this stack.
*/
readonly orgSlug: pulumi.Output<string>;
/**
* Prometheus name for this instance.
*/
readonly prometheusName: pulumi.Output<string>;
/**
* Use this URL to query hosted metrics data e.g. Prometheus data source in Grafana
*/
readonly prometheusRemoteEndpoint: pulumi.Output<string>;
/**
* Use this URL to send prometheus metrics to Grafana cloud
*/
readonly prometheusRemoteWriteEndpoint: pulumi.Output<string>;
/**
* Prometheus status for this instance.
*/
readonly prometheusStatus: pulumi.Output<string>;
/**
* Prometheus url for this instance.
*/
readonly prometheusUrl: pulumi.Output<string>;
/**
* Prometheus user ID. Used for e.g. remote_write.
*/
readonly prometheusUserId: pulumi.Output<number>;
/**
* Region slug to assign to this stack. Changing region will destroy the existing stack and create a new one in the desired region. Use the region list API to get the list of available regions: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-regions.
*/
readonly regionSlug: pulumi.Output<string | undefined>;
/**
* Subdomain that the Grafana instance will be available at (i.e. setting slug to “\n\n” will make the instance
* available at “https://\n\n.grafana.net".
*/
readonly slug: pulumi.Output<string>;
/**
* Status of the stack.
*/
readonly status: pulumi.Output<string>;
readonly tracesName: pulumi.Output<string>;
readonly tracesStatus: pulumi.Output<string>;
/**
* Base URL of the Traces instance configured for this stack. To use this in the Tempo data source in Grafana, append `/tempo` to the URL.
*/
readonly tracesUrl: pulumi.Output<string>;
readonly tracesUserId: pulumi.Output<number>;
/**
* Custom URL for the Grafana instance. Must have a CNAME setup to point to `.grafana.net` before creating the stack
*/
readonly url: pulumi.Output<string>;
/**
* Whether to wait for readiness of the stack after creating it. The check is a HEAD request to the stack URL (Grafana instance). Defaults to `true`.
*/
readonly waitForReadiness: pulumi.Output<boolean | undefined>;
/**
* How long to wait for readiness (if enabled). Defaults to `5m0s`.
*/
readonly waitForReadinessTimeout: pulumi.Output<string | undefined>;
/**
* Create a CloudStack 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: CloudStackArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering CloudStack resources.
*/
export interface CloudStackState {
/**
* Name of the Alertmanager instance configured for this stack.
*/
alertmanagerName?: pulumi.Input<string>;
/**
* Status of the Alertmanager instance configured for this stack.
*/
alertmanagerStatus?: pulumi.Input<string>;
/**
* Base URL of the Alertmanager instance configured for this stack.
*/
alertmanagerUrl?: pulumi.Input<string>;
/**
* User ID of the Alertmanager instance configured for this stack.
*/
alertmanagerUserId?: pulumi.Input<number>;
/**
* Description of stack.
*/
description?: pulumi.Input<string>;
graphiteName?: pulumi.Input<string>;
graphiteStatus?: pulumi.Input<string>;
graphiteUrl?: pulumi.Input<string>;
graphiteUserId?: pulumi.Input<number>;
logsName?: pulumi.Input<string>;
logsStatus?: pulumi.Input<string>;
logsUrl?: pulumi.Input<string>;
logsUserId?: pulumi.Input<number>;
/**
* Name of stack. Conventionally matches the url of the instance (e.g. “\n\n.grafana.net”).
*/
name?: pulumi.Input<string>;
/**
* Organization id to assign to this stack.
*/
orgId?: pulumi.Input<number>;
/**
* Organization name to assign to this stack.
*/
orgName?: pulumi.Input<string>;
/**
* Organization slug to assign to this stack.
*/
orgSlug?: pulumi.Input<string>;
/**
* Prometheus name for this instance.
*/
prometheusName?: pulumi.Input<string>;
/**
* Use this URL to query hosted metrics data e.g. Prometheus data source in Grafana
*/
prometheusRemoteEndpoint?: pulumi.Input<string>;
/**
* Use this URL to send prometheus metrics to Grafana cloud
*/
prometheusRemoteWriteEndpoint?: pulumi.Input<string>;
/**
* Prometheus status for this instance.
*/
prometheusStatus?: pulumi.Input<string>;
/**
* Prometheus url for this instance.
*/
prometheusUrl?: pulumi.Input<string>;
/**
* Prometheus user ID. Used for e.g. remote_write.
*/
prometheusUserId?: pulumi.Input<number>;
/**
* Region slug to assign to this stack. Changing region will destroy the existing stack and create a new one in the desired region. Use the region list API to get the list of available regions: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-regions.
*/
regionSlug?: pulumi.Input<string>;
/**
* Subdomain that the Grafana instance will be available at (i.e. setting slug to “\n\n” will make the instance
* available at “https://\n\n.grafana.net".
*/
slug?: pulumi.Input<string>;
/**
* Status of the stack.
*/
status?: pulumi.Input<string>;
tracesName?: pulumi.Input<string>;
tracesStatus?: pulumi.Input<string>;
/**
* Base URL of the Traces instance configured for this stack. To use this in the Tempo data source in Grafana, append `/tempo` to the URL.
*/
tracesUrl?: pulumi.Input<string>;
tracesUserId?: pulumi.Input<number>;
/**
* Custom URL for the Grafana instance. Must have a CNAME setup to point to `.grafana.net` before creating the stack
*/
url?: pulumi.Input<string>;
/**
* Whether to wait for readiness of the stack after creating it. The check is a HEAD request to the stack URL (Grafana instance). Defaults to `true`.
*/
waitForReadiness?: pulumi.Input<boolean>;
/**
* How long to wait for readiness (if enabled). Defaults to `5m0s`.
*/
waitForReadinessTimeout?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a CloudStack resource.
*/
export interface CloudStackArgs {
/**
* Description of stack.
*/
description?: pulumi.Input<string>;
/**
* Name of stack. Conventionally matches the url of the instance (e.g. “\n\n.grafana.net”).
*/
name?: pulumi.Input<string>;
/**
* Region slug to assign to this stack. Changing region will destroy the existing stack and create a new one in the desired region. Use the region list API to get the list of available regions: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-regions.
*/
regionSlug?: pulumi.Input<string>;
/**
* Subdomain that the Grafana instance will be available at (i.e. setting slug to “\n\n” will make the instance
* available at “https://\n\n.grafana.net".
*/
slug: pulumi.Input<string>;
/**
* Custom URL for the Grafana instance. Must have a CNAME setup to point to `.grafana.net` before creating the stack
*/
url?: pulumi.Input<string>;
/**
* Whether to wait for readiness of the stack after creating it. The check is a HEAD request to the stack URL (Grafana instance). Defaults to `true`.
*/
waitForReadiness?: pulumi.Input<boolean>;
/**
* How long to wait for readiness (if enabled). Defaults to `5m0s`.
*/
waitForReadinessTimeout?: pulumi.Input<string>;
}