@pulumiverse/grafana
Version:
A Pulumi package for creating and managing grafana.
149 lines (148 loc) • 6.15 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages Grafana Fleet Management pipelines.
*
* Pipelines are always sent to the API with a Terraform pipeline source (SOURCE_TYPE_TERRAFORM) so Fleet Management can show them as Terraform-managed. Use the optional terraformSourceNamespace argument (defaults to the string "default") for a stable namespace per root or workspace.
*
* * [Official documentation](https://grafana.com/docs/grafana-cloud/send-data/fleet-management/)
* * [API documentation](https://grafana.com/docs/grafana-cloud/send-data/fleet-management/api-reference/pipeline-api/)
* * Step-by-step guide
*
* Required access policy scopes:
*
* * fleet-management:read
* * fleet-management:write
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as grafana from "@pulumiverse/grafana";
* import * as std from "@pulumi/std";
*
* const test = new grafana.fleetmanagement.Pipeline("test", {
* name: "my_pipeline",
* contents: std.index.file({
* input: "config.alloy",
* }).result,
* matchers: [
* "collector.os=~\".*\"",
* "env=\"PROD\"",
* ],
* enabled: true,
* });
* ```
*
* ## Import
*
* ```sh
* terraform import grafana_fleet_management_pipeline.name "{{ name }}"
* ```
*/
export declare class Pipeline extends pulumi.CustomResource {
/**
* Get an existing Pipeline 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?: PipelineState, opts?: pulumi.CustomResourceOptions): Pipeline;
/**
* Returns true if the given object is an instance of Pipeline. 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 Pipeline;
/**
* Type of the config. Must be one of: ALLOY, OTEL. Defaults to ALLOY if not specified.
*/
readonly configType: pulumi.Output<string>;
/**
* Configuration contents of the pipeline to be used by collectors (can be Alloy config syntax or OTel YAML)
*/
readonly contents: pulumi.Output<string>;
/**
* Whether the pipeline is enabled for collectors
*/
readonly enabled: pulumi.Output<boolean>;
/**
* Used to match against collectors and assign pipelines to them; follows the syntax of Prometheus Alertmanager matchers
*/
readonly matchers: pulumi.Output<string[]>;
/**
* Name of the pipeline which is the unique identifier for the pipeline
*/
readonly name: pulumi.Output<string>;
/**
* Namespace sent with the pipeline source (always `SOURCE_TYPE_TERRAFORM` in the Fleet Management API). Use a stable value per Terraform root or workspace so the UI shows Terraform as the source and API sync semantics stay consistent. If omitted, the namespace `default` is used.
*/
readonly terraformSourceNamespace: pulumi.Output<string>;
/**
* Create a Pipeline 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: PipelineArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Pipeline resources.
*/
export interface PipelineState {
/**
* Type of the config. Must be one of: ALLOY, OTEL. Defaults to ALLOY if not specified.
*/
configType?: pulumi.Input<string>;
/**
* Configuration contents of the pipeline to be used by collectors (can be Alloy config syntax or OTel YAML)
*/
contents?: pulumi.Input<string>;
/**
* Whether the pipeline is enabled for collectors
*/
enabled?: pulumi.Input<boolean>;
/**
* Used to match against collectors and assign pipelines to them; follows the syntax of Prometheus Alertmanager matchers
*/
matchers?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Name of the pipeline which is the unique identifier for the pipeline
*/
name?: pulumi.Input<string>;
/**
* Namespace sent with the pipeline source (always `SOURCE_TYPE_TERRAFORM` in the Fleet Management API). Use a stable value per Terraform root or workspace so the UI shows Terraform as the source and API sync semantics stay consistent. If omitted, the namespace `default` is used.
*/
terraformSourceNamespace?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Pipeline resource.
*/
export interface PipelineArgs {
/**
* Type of the config. Must be one of: ALLOY, OTEL. Defaults to ALLOY if not specified.
*/
configType?: pulumi.Input<string>;
/**
* Configuration contents of the pipeline to be used by collectors (can be Alloy config syntax or OTel YAML)
*/
contents: pulumi.Input<string>;
/**
* Whether the pipeline is enabled for collectors
*/
enabled?: pulumi.Input<boolean>;
/**
* Used to match against collectors and assign pipelines to them; follows the syntax of Prometheus Alertmanager matchers
*/
matchers?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Name of the pipeline which is the unique identifier for the pipeline
*/
name?: pulumi.Input<string>;
/**
* Namespace sent with the pipeline source (always `SOURCE_TYPE_TERRAFORM` in the Fleet Management API). Use a stable value per Terraform root or workspace so the UI shows Terraform as the source and API sync semantics stay consistent. If omitted, the namespace `default` is used.
*/
terraformSourceNamespace?: pulumi.Input<string>;
}